unicode

How can I convert an integer into a Unicode string in C?

I am working on the Firmware for an embedded USB project. The production programmer I would like to use automatically writes the Serial Number into the device flash memory at a specified memory address. The programmer stores the serial number as Hex digits in a specified number of bytes. For example, if I tell it to store the serial numb...

MySQL CHAR() Function and UTF8 Output?

+--------------------------+--------------------------------------------------------+ | Variable_name | Value | +--------------------------+--------------------------------------------------------+ | character_set_client | utf8 ...

Confusion on Unicode and Multibyte Articles

By referring Joel's Article Some people are under the misconception that Unicode is simply a 16-bit code where each character takes 16 bits and therefore there are 65,536 possible characters. This is not, actually, correct. After reading the whole article, my point is that, if someone told you, his text is in unicode, yo...

Unicode character sets & encoding in browsers

I'm trying to find out how character sets/encoding are implemented in browsers, specifically Unicode. Are sets/encodings implemented separately in each browser or is it OS specific? Is it possible to find out what version of the Unicode Character Db (UCD) is being used? How are UCD updates pushed to each browser/OS? (Is it ever pushed ...

CDOSYS and Unicode in the from field - vbScript.

I've got the code below, and I'm trying to set the from field to allow unicode. Currently in my email client I get "??". The subject line and any content shows the unicode correctly. And looking at the MSDN the property should be "urn:schemas:httpmail:from". Anyone solved this issue? Thanks M Dim AC_EMAIL : AC_EMAIL = "[email protected]...

Accent-insensitive sorting in MySQL

I am trying to achieve accent and case-insensitive sorting in MySQL. Following the instructions in the manual, this is supposed to work with the utf8 character set and utf8_general_ci collation. When I follow the example in the manual (http://dev.mysql.com/doc/refman/5.1/en/charset-collation-implementations.html) under "Collations for ...

Python string decoding issue

I am trying to parse a CSV file containing some data, mostly numeral but with some strings - which I do not know their encoding, but I do know they are in Hebrew. Eventually I need to know the encoding so I can unicode the strings, print them, and perhaps throw them into a database later on. I tried using Chardet, which claims the stri...

Signedness of char and Unicode in C++0x

From the C++0x working draft, the new char types (char16_t and char32_t) for handling Unicode will be unsigned (uint_least16_t and uint_least32_t will be the underlying types). But as far as I can see (not very far perhaps) a type char8_t (based on uint_least8_t) is not defined. Why ? And it's even more confusing when you see that a ...

How to Regex international alphabet (english a-z, + non english)

Hello, I want to allow only entered data from the English alphabet and from alphabet from Germany like öäü OR France like áê or Chinese like ... How can I configure my Regex so it accepts all alphabetical chars from internal alphabet? ...

python json loads and unicode

I have the following case where I get the result of UTF-8 encoded HTTP response. I want to load the response content(JSON). However I don't know why I have to do 2 json.loads so that I get the final list: result = urllib2.urlopen(req).read() print result, type(result) #=> "[{\"pk\": 66, \"model\": \"core.job\", \"fields\": {\"customer\"...

SQLite, python, unicode, and non-utf data

I started by trying to store strings in sqlite using python, and got the message: sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode stri...

solve copy/paste encoding problems?

I hear that you can copy paste text from MS word and send an email or post something and there will be an encoding problem. I also heard from someone else its only a problem with webpages that cant handle unicode. Is it possible to have a doc that cannot be copy/paste to a webbrowsers/apps properly? (assuming its all text and only has a...

Why other languages character doesn't show in browser title bar?

Why other languages character doesn't show in browser title bar? for example see this http://chhotikashi.com/ ...

How to encode HTML non-ASCII data to UTF-8 in Python

I tried to do that, and I found this errors: >>> import re >>> x = 'Ingl\xeas' >>> x 'Ingl\xeas' >>> print x Ingl�s >>> x.decode('utf8') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(...

Using named pipe to communicate between unicode and non-unicode processes on windows.

If a process with unicode enabled creates a named pipe, it must pass a LPCTSTR for the pipe name, in this case a LPCWSTR. Will a second process wihtout unicode be able to open that pipe by passing a LPCSTR for the pipe name? Also, can I call CreateNamedPipeW or CreateNamedPipeA and ignore whether unicode is enabled, or do I have to call...

Insert unicode strings into CleverCSS

How can one insert a Unicode string CSS into CleverCSS? In particular, how could one produce the following CSS using CleverCSS: li:after { content: "\00BB \0020"; } I've figured out CleverCSS's parsing rules, but suffice that the permutations I've thought sensible have failed, for example: li: content: "\\00BB \\0020" // beco...

OpenSSL with unicode paths

Hi all, I have an implementation of SSL handshake from the client side, by using these functions: SSL_CTX_load_verify_locations SSL_CTX_use_certificate_chain_file SSL_CTX_use_PrivateKey_file All functions get char* type for the filename parameter. How can I change it to support also unicode file locations? Thanks! ...

How do I make a case insensitive compare between two Unicode characters or strings under Windows in C/C++?

I'm looking for a way of doing a insensitive compare of two Unicode characters (char32) under Windows (C/C++, not .NET). I am aware that the solution is supposed to be locale aware. I would like a solution that would not require additional third-party libraries. ...

Weird error using preg_match and unicode

if (preg_match('(\p{Nd}{4}/\p{Nd}{2}/\p{Nd}{2}/\p{L}+)', '2010/02/14/this-is-something')) { // do stuff } The above code works. However this one doesn't. if (preg_match('/\p{Nd}{4}/\p{Nd}{2}/\p{Nd}{2}/\p{L}+/u', '2010/02/14/this-is-something')) { // do stuff } Maybe someone could shed some light as to why the one below doesn't...

Accented characters in matplotlib

Does anyone know a way to get matplotlib to render accented chars (é,ã,â,etc)? For instance i'm trying to use accented chars on set_yticklabels() and matplot renders squares instead, and when i use unicode() it renders the wrong chars. Is there a way to make this work? Thanks in advance, Jim. Update Turns out you can use u"éã" but f...