Excel to CSV with UTF8 encoding [closed]

A simple workaround is to use Google Spreadsheet. Paste (values only if you have complex formulas) or import the sheet then download CSV. I just tried a few characters and it works rather well. NOTE: Google Sheets does have limitations when importing. See here. NOTE: Be careful of sensitive data with Google Sheets. EDIT: Another … Read more

What is the difference between UTF-8 and Unicode?

To expand on the answers others have given: We’ve got lots of languages with lots of characters that computers should ideally display. Unicode assigns each character a unique number, or code point. Computers deal with such numbers as bytes… skipping a bit of history here and ignoring memory addressing issues, 8-bit computers would treat an … Read more

What is the best collation to use for MySQL with PHP? [closed]

The main difference is sorting accuracy (when comparing characters in the language) and performance. The only special one is utf8_bin which is for comparing characters in binary format. utf8_general_ci is somewhat faster than utf8_unicode_ci, but less accurate (for sorting). The specific language utf8 encoding (such as utf8_swedish_ci) contain additional language rules that make them the … Read more

Converting string to byte array in C#

If you already have a byte array then you will need to know what type of encoding was used to make it into that byte array. For example, if the byte array was created like this: byte[] bytes = Encoding.ASCII.GetBytes(someString); You will need to turn it back into a string like this: string someString = … Read more

How can I do Base64 encoding in Node.js?

Buffers can be used for taking a string or piece of data and doing Base64 encoding of the result. For example: > console.log(Buffer.from(“Hello World”).toString(‘base64’)); SGVsbG8gV29ybGQ= > console.log(Buffer.from(“SGVsbG8gV29ybGQ=”, ‘base64’).toString(‘ascii’)) Hello World Buffers are a global object, so no require is needed. Buffers created with strings can take an optional encoding parameter to specify what encoding the … Read more

When are you supposed to use escape instead of encodeURI / encodeURIComponent?

escape() Don’t use it! escape() is defined in section B.2.1.2 escape and the introduction text of Annex B says: … All of the language features and behaviours specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification. … … Programmers should not … Read more