LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 06-11-2009, 04:43 AM   #1
culin
Member
 
Registered: Sep 2006
Distribution: Fedora Core 10
Posts: 243

Rep: Reputation: 31
UTF16 value of Charecters


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
 
Old 06-11-2009, 05:58 AM   #2
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509

Rep: Reputation: 41
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


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

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration