utf

How to convert an ASCII string to an UTF8 string in C++?

How to convert an ASCII std::string to an UTF8 (Unicode) std::string in C++? ...

Reading php generated XML in flash?

Here is part 1 of our problem (Loading a dynamically generated XML file as PHP in Flash). Now we were able to get Flash to read the XML file, but we can only see the Flash render correctly when tested(test movie) from the actual Flash program. However, when we upload our files online to preview the Flash does not render correctly, missi...

HTML numerical to UTF

How can i convert this $langClarContent = > &# 1059.,.,.,&# 1090.,&# 1077.,&# 1083.,Dokeos &# 1077., &# 1089.,&# 1080.,&# 1089.,&# 1090.,&# 1077.,&# 1084., &# 1079.,&# 1072., &# 1091.,&# 1087.,&# 1088.,&# 1072.,&# 1074.,&# 1091.,&# 1074.,&# 1072.,&# 1114.,., &# 1089.,., &# 1091.,&# 1095.,&# 1077.,&# 1114.,&# 1077., &# 1080., &# 1079.,&...

Can not set Character Encoding using sun-web.xml

I am trying to send special characters like spanish chars from my page to a JSP page as a form parameter. When I try get the parameter which I sent, it shows that as "?" (Question mark). After searching on java.net thread I came to know that I should have following entry in my sun-web.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE...

Wordpress is ignoring Unicode Chars in URL

Hi, I am using wordpress with this type of permalink: /%year%/%monthnum%/%postname%/ if I use this type of url: example.com/2010/03/तकनीक it treats this url like this example.com/2010/03/ (By ignoring unicode chars) and displays March 2010 archive list. if I use english url: example.com/2010/03/technology then it works perfectly. T...

How to convert an UTF string with scandinavian characters to ASCII?

I would like to convert this string foo_utf = u'nästy chäräctörs with å and co.' # unicode into this foo_ascii = 'nästy chäräctörs with å and co.' # ASCII . Any idea how to do this in Python (2.6)? I found unicodedata module but I have no idea how to do the transformation. ...

MySql UTF encoding

java.sql.SQLException: Incorrect string value: '\xAC\xED\x00\x05sr...' for column 'xxxx' The column is a longtext in MYSQL with utf8 charset and utf8_general_ci collation. What is wrong? ...

PHP utf encoding problem

How can I encode strings on UTF-16BE format in PHP? For "Demo Message!!!" the encoded string should be '00440065006D006F0020004D00650073007300610067006'. Also, I need to encode Arabic characters to this format. ...

delphi vs c# post returns different strings - utf problem?

I'm posting two forms - one in c# and one in delphi. But the result string seems to be different: c# returns: ¤@@1@@@@1@@@@1@@xśm˱Â0Đ... delphi returns: #$1E'@@1@@@@1@@@@1@@x'#$009C... and sice both are compressed streams I'm getting errors while trying to decompress it... The C# is 'correct' - ie. extracts. I'm not an expert on delp...

Unicode characters from JSON.stringify to real unicode characters

I use JSON.stringify() function to stringify JS objects for AJAX sending to PHP. The problem arises when JSON.stringify function encodes unicode characters to format \uxxxx (eg. \u000a). My question is how to convert those characters to regular unicode characters in PHP? ...

problem injecting UTF8 encoded JSONP into a Win 1255 encoded webpage

Hi all, I am developing a third-party service embedded in websites as a JS snippet, that amongst other things need to fetch some jsonp data from my PHP server, and display the text contained in the json object on the hosting embedding website. I am using jQuery, so I issue the following .getJSON request: $.getJSON("http://localhost/ph...

Delphi: Encoding Strings as Python do

Hi! I want to encode strings as Python do. Python code is this: def EncodeToUTF(inputstr): uns = inputstr.decode('iso-8859-2') utfs = uns.encode('utf-8') return utfs This is very simple. But in Delphi I don't understand, how to encode, to force first the good character set (no matter, which computer we have). I tried this te...

What is the need to ENCODE Unicode characters via UTF,etc ? Why can't we simply store them as binary of code points ?

Unicode simply assigns an integer to each character. UTF-8 or others are used to encode these integers ("code points") to a sequence of bytes to be stored in the memory. My question is that why can't we simply store the character as the binary representation of its Unicode value (the "code point") ? Consequently, some languages have char...

How does Microsoft handle the fact that UTF-16 is a variable length encoding in their C++ standard library implementation

Having a variable length encoding is indirectly forbidden in the standard. So I have several questions: How is the following part of the standard handled? 17.3.2.1.3.3 Wide-character sequences A wide-character sequence is an array object (8.3.4) A that can be declared as T A[N], where T is type wchar_t (3.9.1), optionally qual...