LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Thread Tools
Old 06-11-2009, 05:43 AM   #1
culin
Member
 
Registered: Sep 2006
Distribution: redhat-Fedora Core 4
Posts: 233
Thanked: 0
UTF16 value of Charecters


[Log in to get rid of this advertisement]
Hi all,
Can anyone tell me how to get the UTF16 values of the English alphabets when they are stored ??
say, i have a variable
char ch = 'A'
now is there any way to know or print its UTF16 encoded value when it is stored in memory ?
Thanks
culin is offline     Reply With Quote
Old 06-11-2009, 06:58 AM   #2
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 507
Thanked: 22
In the Linux/Unix world UTF-8 ist used and usally not UTF-16. (Just to mention that..)

And yes, you can find out the encoding of some character:

All ASCII (and iso-8859-1 btw) characters are in Unicode/UTF* like their counterparts in ASCII but just with leading 00 - if A is in ASCII 41 (in hex), it's translated into 0041. (More bits..)

Usally, you've got some encoding/recoding functions in most programming languages for this stuff.

See also the excellent Wikipedia articles about Unicode, UTF-16 and UTF-8.
Su-Shee is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
quake1 special charecters Shadowalker Linux - Software 0 11-27-2005 08:10 PM
charecters !! huno Programming 3 05-29-2005 07:15 AM
how to read UTF8, UTF16 or UTF32 kuna Programming 2 12-21-2004 03:58 PM
Chinese charecters. whitefox Slackware 2 05-29-2003 05:45 PM
Incorect charecters when using telnet/SSH quackxp Linux - Newbie 1 02-07-2003 12:49 PM


All times are GMT -5. The time now is 07:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration