unicode

Outlook Converts Unicode Email Address to Garbage

Hi, I am working on an ASP.NET project where we are updating all of our websites to support Unicode values. In one place, we are allowing users to enter their email address as Unicode. I use the following code snippet to display the "mailto" address hyperlink: Response.Write("<a href='mailto:" + Server.UrlEncode(email.EmailAddress) + "...

Does or Can VBscript's SendKeys support Unicode?

I am finding that VBscript's SendKeys does not support Unicode. It supports some like A-65, but not foreign letters like the letter Aleph (א) from the Hebrew alphabet. Prob outside its supported range. Could be for decimal values of 128+, it gives a "?", and it only supports the ASCII range. I can type and see Hebrew letters on my compu...

How to write Russian characters in file?

In console when I'm trying output Russian characters It gives me ??????????????? Who know why? I tried write to file - in this case the same situation. for example f=open('tets.txt','w') f.write('some russian text') f.close inside file is - ?????????????????????????/ or p="some russian text" print p ????????????? In additional...

applying unicode-bidi style to <input> doesn't work in IE8

It seems that applying the unicode-bidi with the direction property in an input tag doesn't work in IE8. Here is a sample: (the unicode-bidi works fine for a div element but doesn't work for the value set in the input tag - note that it is working in firefox). <html> <body> <div style="direction:ltr;unicode-bidi:bidi-overr...

Next question about russian encoding, mssql and python.

Next question about russian encoding, mssql and python. I have this simple code: import pymssql import codecs conn=pymssql.connect(host='localhost:1433', user='sa', password='password', database='TvPgms') cur = conn.cursor() cur.execute('SELECT TOP 5 CAST( Name AS nvarchar(400) ), CONVERT(nvarchar(400), idProgram) FROM dbo.Programs') ...

How to write programmatically some unicode text in RTF format?

In order to generate RTF programmatically I have decided to use rtflib v1.0 from codeproject.com. But I can't understand how to generate text in russian unicode. So I need to generate a unicode text. Could someone help me? P.S. Honeslty, I could write in .rtf file some text in, only by opening it with MS Word. But after writeing some te...

How can I cin and cout some unicode text?

I ask a code snippet which cin a unicode text, concatenates another unicode one to the first unicode text and the cout the result. P.S. This code will help me to solve another bigger problem with unicode. But before the key thing is to accomplish what I ask. ADDED: BTW I can't write in the comman line any unicode symbol when I run the ...

Using JavaScript to fix badly encoded Unicode characters?

I'm working on a web site with a content management system that does a bad job of displaying any text with non-ASCII characters. For example, right single-quotes show up as on the following web page (this is just an example, not from the CMS-driven web site): http://www.gregboettcher.com/cmsunicode.html I can't control the inner workin...

More elegant way to decode \u0000 Unicode in an input stream

I'm parsing an input stream coming from Facebook. I'm using something like BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8")); And then in.readLine to actually read from the stream. The stream seems to have Unicode characters already encoded in ASCII, so I see things like \u00e4 (with \u actu...

How to convert to unicode from a char array with an intermediate null charaters

i used + (id)stringWithCString:mycharaters encoding:NSUnicodeStringEncoding mycharaters is a char array with an intermediate null charaters and end with two null charaters. char mycharaters[20]; it contains a unicode string and i want to show it. but "The array must end with a NULL character; intermediate NULL characters are not allo...

How to convert a unicode string to its unicode escapes?

Say I have a text "Բարև Hello Здравствуй". (I save this code in QString, but if you know other way to store this text in c++ code, you'r welcome.) How can I convert this text to Unicode escapes like this "\u1330\u1377\u1408\u1415 Hello \u1047\u1076\u1088\u1072\u1074\u1089\u1090\u1074\u1091\u1081" (see here)? ...

How to force a specific code page for a website?

HI I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag. I uploaded initially on a test account on my server ...

En/em space in LaTeX removed by pdflatex

I'm trying to include all the Unicode whitespace characters in a LaTeX document as verbatim text (e.g. \verb#start end#), but I've gotten three different results: With no packages, the spaces are simply not there in the PDF file. with \usepackage[utf8x,utf8]{inputenc} I get an error: "Unicode char \u8:  not set up for use with LaTeX." ...

How to "force" a file's ISO-8859-1ness?

I remember when I used to develop website in Japan - where there are three different character encodings in currency - the developers had a trick to "force" the encoding of a source file (so it would always open in their IDEs in the correct encoding etc). What they did was to put a comment at the top of the file containing a Japanese ch...

Main only recieving first letters of arguments

int _tmain(int argc, char** argv) { FILE* file1=fopen(argv[1],"r"); FILE* file2=fopen(argv[2],"w"); } It seems as if only the first letter of the arguments is received... I dont get why! std::cout<<"Opening "<<strlen(argv[1])<<" and writing to "<<strlen(argv[2])<<std::endl; outputs 1 and 1 no matter wha...

Error in python: UnicodeEncodeError: 'gbk' codec can't encode character: illegal multibyte sequence

Hi, I want to get html content from a url and parse the html content with regular expression. But the html content has some multibyte characters. So I met the error described in title. Could somebody tell me how to resolve this problem? Thanks ...

url shortening with unicode conversion for ids?

I need to make a url shortener for work, so I'm trying to figure out what is going to be the best schema to provide the largest possible number of links in the smallest possible id string. I had thought of converting unicode characters to bit values to use as ids for a simple database--is such a thing possible? Is there any particular u...

Ruby 1.9, Rails 2.3.9 and unicode characters in database and erb views, still a no go?

I have a Rails application running on Rails 2.3.9. It runs fine with ruby 1.8.7. I'm testing it with ruby 1.9.2-head right now. The application loads fine until I try to load a page that relies on a unicode string. Then I get the infamous encoding error: ActionView::TemplateError (incompatible character encodings: UTF-8 and ASCII-8BIT...

How to filter (or replace) unicode characters that would take more than 3 bytes in UTF-8?

I'm using Python and Django, but I'm having a problem caused by a limitation of MySQL. According to the MySQL 5.1 documentation, their utf8 implementation does not support 4-byte characters. MySQL 5.5 will support 4-byte characters using utf8mb4; and, someday in future, utf8 might support it as well. But my server is not ready to upgrad...

Python UTF8 string confusion

Been banging my head on this for a while and I've read a bunch of articles and the issue isn't any clearer. I have a bunch of strings stored in my database, imagine the following: x = '\xd0\xa4' y = '\x92' At the Python shell I get the following: print x Ф print y ? Which is exactly what I want to see. However then there is the fol...