tagged [utf-8]

Fixing broken UTF-8 encoding

Fixing broken UTF-8 encoding I am in the process of fixing some bad UTF-8 encoding. I am currently using PHP 5 and MySQL. In my database I have a few instances of bad encodings that print like: î -...

7 Jul at 22:25

Using PowerShell to write a file in UTF-8 without the BOM

Using PowerShell to write a file in UTF-8 without the BOM `Out-File` seems to force the BOM when using UTF-8: How can I write a file in UTF-8 with no BOM using PowerShell? ### Update 2021 PowerShell h...

C# Mysql UTF8 Encoding

C# Mysql UTF8 Encoding I have a mysql database with utf8_general_ci encoding , i'm connecting to the same database with php using utf-8 page and file encode and no problem but when connection mysql wi...

27 Jul at 13:48

How to get UTF-8 working in Java webapps?

How to get UTF-8 working in Java webapps? I need to get UTF-8 working in my Java webapp (servlets + JSP, no framework used) to support `äöå` etc. for regular Finnish text and Cyrillic alphabets like `...

20 Mar at 20:32

What's the difference between UTF8/UTF16 and Base64 in terms of encoding

What's the difference between UTF8/UTF16 and Base64 in terms of encoding In. c# We can use below classes to do encoding: - `System.Text.Encoding.UTF8`- `System.Text.Encoding.UTF16`- `System.Text.Encod...

22 Jan at 14:56

How do I convert between ISO-8859-1 and UTF-8 in Java?

How do I convert between ISO-8859-1 and UTF-8 in Java? Does anyone know how to convert a string from ISO-8859-1 to UTF-8 and back in Java? I'm getting a string from the web and saving it in the RMS (J...

How do I write out a text file in C# with a code page other than UTF-8?

How do I write out a text file in C# with a code page other than UTF-8? I want to write out a text file. Instead of the default UTF-8, I want to write it encoded as ISO-8859-1 which is code page 28591...

24 Jun at 20:34

Encoding strings in XML from Oracle query

Encoding strings in XML from Oracle query I'm producing XML right from PL/SQL in Oracle. What is the preferred way of ensuring that outputted strings are XML-conformant, with regards to special chara...

28 Oct at 18:53

What are Unicode, UTF-8, and UTF-16?

What are Unicode, UTF-8, and UTF-16? What's the basis for Unicode and why the need for UTF-8 or UTF-16? I have researched this on Google and searched here as well, but it's not clear to me. In [VSS](h...

18 Feb at 17:51

What is the reason that Encoding.UTF8.GetString and Encoding.UTF8.GetBytes are not inverse of each other?

What is the reason that Encoding.UTF8.GetString and Encoding.UTF8.GetBytes are not inverse of each other? Probably I am missing something, but I do not understand why Encoding.UTF8.GetString and Encod...

31 Jul at 07:53

"’" showing on page instead of " ' "

"’" showing on page instead of " ' " `’` is showing on my page instead of `'`. I have the `Content-Type` set to `UTF-8` in both my `` tag and my HTTP headers: ![enter image description here](https...

28 Dec at 23:43

Serializing an object as UTF-8 XML in .NET

Serializing an object as UTF-8 XML in .NET Proper object disposal removed for brevity but I'm shocked if this is the simplest way to encode an object as UTF-8 in memory. There has to be an easier way ...

5 Oct at 08:40

UTF-8 byte[] to String

UTF-8 byte[] to String Let's suppose I have just used a `BufferedInputStream` to read the bytes of a UTF-8 encoded text file into a byte array. I know that I can use the following routine to convert t...

10 Apr at 07:10

How do I correct the character encoding of a file?

How do I correct the character encoding of a file? I have an ANSI encoded text file that should not have been encoded as ANSI as there were accented characters that ANSI does not support. I would rath...

How to use Greek symbols in ggplot2?

How to use Greek symbols in ggplot2? My categories need to be named with Greek letters. I am using `ggplot2`, and it works beautifully with the data. Unfortunately I cannot figure out how to put those...

30 Apr at 13:17

MySQL C# Text Encoding Problems

MySQL C# Text Encoding Problems I have an old MySQL database with encoding set to UTF-8. I am using Ado.Net Entity framework to connect to it. The string that I retrieve from it have strange character...

2 Jun at 22:37

SET NAMES utf8 in MySQL?

SET NAMES utf8 in MySQL? I often see something similar to this below in PHP scripts using MySQL I have never had to do this for any project yet so I have a couple basic questions about it. 1. Is this...

1 Feb at 00:51

Set Encoding of File to UTF8 With BOM in Sublime Text 3

Set Encoding of File to UTF8 With BOM in Sublime Text 3 When I open a file in Sublime Text 3, at the bottom I have an option to set the Character Encoding as shown in the screenshot. ![setting encodin...

Javascript: Unicode string to hex

Javascript: Unicode string to hex I'm trying to convert a unicode string to a hexadecimal representation in javascript. This is what I have: ``` function convertFromHex(hex) { var hex = hex.toString...

18 Mar at 20:47

C# Convert string from UTF-8 to ISO-8859-1 (Latin1) H

C# Convert string from UTF-8 to ISO-8859-1 (Latin1) H I have googled on this topic and I have looked at every answer, but I still don't get it. Basically I need to convert UTF-8 string to ISO-8859-1 a...

29 Jan at 13:35

Conversion between UTF-8 ArrayBuffer and String

Conversion between UTF-8 ArrayBuffer and String I have an `ArrayBuffer` which contains a string encoded using UTF-8 and I can't find a standard way of converting such `ArrayBuffer` into a JS `String` ...

19 Jun at 13:3

ServiceStack.Text's CSVSerializer can't read umlauts

ServiceStack.Text's CSVSerializer can't read umlauts I have CSV files with German language values. So umlaut symbols etc like: . These can be seen in notepad and here on stackoverflow! I'm using Serv...

20 Sep at 06:39

UTF-8: General? Bin? Unicode?

UTF-8: General? Bin? Unicode? I'm trying to figure out what collation I should be using for various types of data. 100% of the content I will be storing is user-submitted. My understanding is that I s...

16 Apr at 13:9

How to Generate all the characters in the UTF-8 charset in .net

How to Generate all the characters in the UTF-8 charset in .net I have been given the task of generating all the characters in the UTF-8 character set to test how a system handles each of them. I do ...

3 Nov at 16:43

UTF-8 all the way through

UTF-8 all the way through I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall ...

9 Jan at 20:48