utf-8

ASP.NET Multiline textbox allowing input above UTF-8

In my web.config I have <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US" uiCulture="de-DE" /> In my page directive I have ResponseEncoding="utf-8" Yet for some reason an ASP TextBox with the TextMode="MultiLine" allows inputs of characters outside of UTF-8. When I paste...

saving hebrew utf8 to database with php

when saving hebrew to a mysql database (utf-8) i am getting it converted to something like this: &times;&uml;&times; editing content directly in the database works and it outputs on the page fine too. sorry forgot to ask a question... what am i doing wrong!? ...

What's different between utf-8 and utf-8 without BOM?

What`s different between utf-8 and utf-8 without BOM? Which is better? ...

pre-commit hook in svn: could not be translated from the native locale to UTF-8

Hi everybody, I have a problem with my pre-commit hook. This hook test if a file is locked when the user commits. When a bad condition happens, it should output that the another user is locking this file or if nobody is locking, it should show "you are not locking this file message (file´s name)". The error happens when the file´s na...

PHP5 UTF-8 encoding error - PHP4 works fine

Hey, i'm having some troubles with UTF-8 encoding on a website. Calling my script using PHP5 all the umlauts (ä, ü, ö,...) look like this: ökflödsköl Calling the script using PHP4 shows everything as expected... both php.ini look the same an so my question would be: is there an other file where i can change the output encoding? T...

Simplest way to get a complete list of all the UTF-8 whitespace characters in PHP

In PHP, what's the most elegant way to get the complete list (array of strings) of all the Unicode whitespace characters, encoded in utf8? I need that to generate test data. ...

Rails - Special Characters converting to ??? when saving

Just trying to handle special characters into a string field on my model. When it saves to my Oracle database which is set to AL32UTF8 it is converting them to ??? Tiny-mce is hooked up on one of the other fields and I was able to configure it to convert a backwards apostrophe for instance to &lsquo; Just need to decode / convert m...

Zend_Cache And UTF-8 Problem

I'm trying to save UTF-8 characters with Zend_Cache (like Ť, š etc) but Zend_Cache is messing them up and saves them as Å, ¾ and other weird characters. Here is a snippet of my code that saves the data to the cache (the UTF-8 characters are messed up only online, when I try it on my PC on localhost it works ok): // cache the external d...

UTF-8 character change to two character

Hi, In my text file, I used a character with value larger than 127 for example 0xDC. Then I loaded that text file in a device. Then I read that text file and that character. Then the character was changed to 0xC3 and 0x9C. How come it change to two character? Thanks ...

file_get_contents() Breaks Up UTF-8 Characters

I am loading a HTML from an external server. The HTML markup has UTF-8 encoding and contains characters such as ľ,š,č,ť,ž etc. When I load the HTML with file_get_contents() like this: $html = file_get_contents('http://example.com/foreign.html'); It messes up the UTF-8 characters and loads Å, ¾, ¤ and similar nonsense instead of proper...

Why Does DOM Change Encoding?

$string = file_get_contents('http://example.com'); if ('UTF-8' === mb_detect_encoding($string)) { $dom = new DOMDocument(); // hack to preserve UTF-8 characters $dom->loadHTML('<?xml encoding="UTF-8">' . $string); $dom->preserveWhiteSpace = false; $dom->encoding = 'UTF-8'; $body = $dom->getElementsByTagName('body...

What is Unicode, UTF-8, 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 when doing a file comparison, sometimes there is a message saying the two files have differing UTF's. Why would this be the case? Please explain in simple terms. ...

Http Digest Authentication, Handle different browser char-sets...

Hi all, I tried to use the Http Authentication Digest Scheme with my php (apache module) based website. In general it works fine, but when it comes to verification of the username / hash against my user database i run into a problem. Of course i do not want to store the user´s password in my database, so i tend to store the A1 hashvalue ...

Saving a Linq to Xml file as ANSI instead of UTF-8 in C# (Ivy)

In C#, I need to create XML files for use with Ivy and NAnt, but am having difficulty in getting the right encoding in the output file. If I use XElement's .Save("C:\foo.xml"), I get the correct looking file, but Ivy and/or NAnt gets upset, as the file is actually saved using UTF-8 but I actually need to save it as ANSI in order to be a...

Why is Java BufferedReader() not reading Arabic and Chinese characters correctly?

I'm trying to read a file which contain English & Arabic characters on each line and another file which contains English & Chinese characters on each line. However the characters of the Arabic and Chinese fail to show correctly - they just appear as question marks. Any idea how I can solve this problem? Here is the code I use for readin...

Extract correct text from a wifstream regardless of encoding.

Here is the program: http://codepad.org/eyxunHotThe encoding of the file is UTF-8. I have a text file named "config.ini" with the following word in it: ➑ball If I use notepad to save the file with "UTF-8" encoding, then run the program, according to the debugger the value of eight_ball is: âball If I use notepad to save the file wi...

How to make a text file have more than one encoding?

I have a file which is ANSI encoded. However it shows Arabic letters inside it. this text file was generated by some program (I have no info on) but it seems like there is some kind of internal encoding (if I might say and if it's possible) for the Arabic letters to make appear. Is there such a thing? If not, how can the ANSI file show ...

Converting from ascii to utf-8 with Python

Hello. I have xmpp bot written in python. One of it's plugins is able to execute OS commands and send output to the user. As far as I know output should be unicode-like to send it over xmpp protocol. So I tried to handle it this way: output = os.popen(cmd).read() if not isinstance(output, unicode): output = unicode(output,'utf-8'...

Visual Studio 2010 and UTF-8 encoding

Is there a way that I can save my Visual Studio 2010 files as UTF-8 encoded? I'm using VS.NET 2010 as a PHP editor using VS.PHP. If there is a macro that will launch during the saving process that will handle this, that would be fine too. Thanks in advance! ...

Passing utf-8 strings between php and javascript

I'm having problems passing utf-8 strings to javascript (ajax). Currently i'm using rawurlencode on the PHP side and unescape on the javascript side. The problem is in latin and rawurlencode doesn't support it fully. Is there any alternative or any better option? ...