character-encoding

How to change characterset of an existing database for Interbase

We have a database and our client is written with Delphi 2007. The latest Interbase 2009 is used. The database is old, I believe it was created around 2002 and is now over 25 GB. Recently I discovered that in IBConsole upper('åäö') generate 'åäö'. It should be 'ÅÄÖ'. This is swedish characters that are missing in the English alphabet...

Context aware switching of character encoding in terminals

When working on projects that use different character encodings I find myself constantly switching the character encoding of a terminal. In some terminals (e.g. gnome-terminal) you can create profiles for different terminals (say, profile "Project A" for the project that uses UTF-8 and profile "Project B" for the one that uses ISO-8859-1...

How to represent tally/five-bar-gate in unicode?

Are there Unicode characters to represent bundles (and partial bundles) of 5 in the style of the tally/five-bar-gate? If not, what would be the most standard/semantic/accessible solution to this problem? Things I've tried but don't like: Using the numbers 1-5 - easily confusing (3 bundles of 5 looks like 555) 1-4 pipes with strike-th...

Internet Explorer 6 : Euro sign not displayed on ajax request

Hello, i'm using jquery 1.4.2 to send an ajax request to a php page then display the result. This works fine with FF3 and IE8, but in IE6 the character € is replaced by a square, i tried to force the character encoding of the php page using header() but it didn t work... I'm working on windows with Zend Studio for eclipse (projet enco...

Iconv.conv in Rails application to convert from unicode to ASCII//translit

We wanted to convert a unicode string in Slovak language into plain ASCII (without accents/carons) That is to do: č->c š->s á->a é->e etc. We tried: cstr = Iconv.conv('us-ascii//translit', 'utf-8', a_unicode_string) It was working on one system (Mac) and was not working on the other (Ubuntu) where it was giving '?' for accented chara...

Character encoding in string

I try to output the german setence containing the letter "ü" in escaped form (ascii 252, octal 374, hex 0xfc) using the following code: pp "Test \374" pp "Test \374".encode("UTF-8") But using ruby 1.8.7 I get: "Test \374" "Test \374" Using ruby 1.9.2 outputs: "Test \xFC" "Test \xFC" How can I get ruby (1.8.7 + 1.9.x) to output "Test...

Difficulties inherent in ASCII and Extended ASCII, and Unicode Compatibility ?

What are the difficulties inherent in ASCII and Extended ASCII and how these difficulties are overcome by Unicode? Can some one explain me the unicode compatibility? And what does the terms associated with Unicode like Planes, Basic Multilingual Plane (BMP), Suplementary Multilingual Plane (SMP), Suplementary Ideographic Plane (SIP), S...

What's the difference between code page and character encoding?

My ASP.NET application imports CSV files. They are mostly saved in spreadsheet or notepad that asks for 'character set', for example: ISO-8859-2, Windows-1210, DOS-852 or Unicode(UTF-8). Wiki says UTF-8 is a character encoding but Windows-1210 and ISO-8859-2 are code pages. Are these terms interchangeable? .NET reads files saved in UT...

Python regex against Latin-1 character encoding?

I have a file which contains (I believe) latin-1 encoding. However, I cannot match regexes against this file. If I cat the file, it looks fine: However, I cannot find the string: In [12]: txt = open("b").read() In [13]: print txt <Vw_IncidentPipeline_Report> In [14]: txt Out[14]: '\x00 \x00 \x00<\x00V\x00w\x00_\x00I\x00n\x0...

META value charset=UTF-8 prevents UTF-8 characters showing.

I've made a test program that is basically just a textarea that I can enter characters into and when I click submit the characters are written to a MySQL test table (using PHP). The test table is collation is UTF-8. The script works fine if I want to write a é or ú to the database it writes fine. But then if I add the following meta s...

Chinese text not displaying properly on web page

I am adding some Chinese text to a primarily English web page and am having trouble getting the characters to display properly. I've got the encoding set to UTF-8 in the meta content type tag, and I am copying/pasting the Chinese I was sent from a Word document. The text is still rendering as follows: 繁體中文版 rather than in Chi...

Is non-unicode the same thing as ASCII?

This stems from a question I had about nvarchar and varchar. According to MSDN, varchar is: ...non-Unicode character data... I've looked around for a clear definition of "non-unicode" but haven't had any luck. Is this the same thing as ASCII? If so, is there a reason that they don't just say ASCII? ...

jQuery .load importing special characters

Hello Stack Overflow! I currently have a mind boggling error. I am using the .load function in jQuery to load images for a slideshow and getting a bunch of errors below by img tag that i am importing the url to. I have done my best to demonstrate my function and markup below. I do not get an error in any modern browsers but IE gives m...

Is it possible to detect text file encoding of two possible?

I read http://stackoverflow.com/questions/90838/how-can-i-detect-the-encoding-codepage-of-a-text-file It's not possible to detect encoding. However is it possible to detect whether encoding is one of two allowed? For example I allow user to use Unicode UTF-8 and iso-8859-2 for their csv files. Is it possible to detect whether it is for...

PHP and character encoding problem with  character

I'm having a problem where PHP (5.2) cannot find the character 'Â' in a string, though it is clearly there. I realize the underlying problem has to do with character encoding, but unfortunately I have no control over the source content. I receive it as UTF-8, with those characters already in the string. I would simply like to remove it...

UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3'

I have an Excel spreadsheet that I'm reading in that contains some £ signs. When I try to read it in using the xlrd module, I get the following error: x = table.cell_value(row, col) x = x.decode("ISO-8859-1") UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 0: ordinal not in range(128) If I rewrite this to...

Posting data ajax jquery, html data

I am using Jquerys ajax function to post data to my database. I have a textarea that allows users to type in their posts and update it to the database. Here is a code snippet: $.ajax({ type : "POST", url: "process.php", data: "postmessage="+ postmessage +"& from_user="+ from_user +"& from_username="+ from_username, My pro...

insert unicode string in sqllite database from qt

Hi, I am creating a sqllite database from qt like this : QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", mConnectionName); db.setDatabaseName("myDattabse.DB"); if (!db.open()) { return false; } When trying to insert macedonian characters in the sqllite database, the characters are inserted as ???. According to this link htt...

Dynamically insert special character into document title

Hi, I am trying to update the document.title with Javascript. This works fine, but now I want to insert the ü character into the title, which gives me a question mark at the place where the ü is supposed to be. Here is my code (I omitted the rest of the title for clarity): document.title = '\u2019 - \u252'; The strange thing is that...

HTML character entities and character encoding set

When including HTML entities in an HTML document, do the entities need to be from the same character encoding set that the document is specified to be using? For example, if I am going to use the copyright sign in an HTML document that is specified as UTF-8, is it necessary to use the Unicode HTML entity (&#x00A9;) or is it okay to use ...