Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How would I code "A" = 0x41 into UCS2 format?

Status
Not open for further replies.

neoaspilet11

Full Member level 5
Joined
Sep 29, 2005
Messages
277
Helped
29
Reputation
56
Reaction score
8
Trophy points
1,298
Location
Cebu, Philippines
Activity points
4,048
Friends,

Any idea whats this? Initillay its description is

Unicode, 16-bit universal multiple-octet coded
character set (ISO/IEC10646).


How would I code "A" = 0x41 into UCS2 format?

Thanks,
neoaspilet11
 

format ucs2

UCS2 is an unofficial Unicode standard plane encoding system using 16 bits, it may be unofficial but its the default encoding system for Java and lots of other stuff these days, basicaly if you know your Unicode hex values you can do it all without problem, just remember that every character has 2 bytes not one and that UCS2 is NOT a character set like Unicode is, UCS2 is a 2 byte encoding method for Unicode, a small but important distinction.

If you want to go from ASCII to Unicode then there are a billion examples on goggle too look at.

Example
Code:
Character
	
A
	U+0041     Unicode
	0x00, 0x41 UCS2 Encoded Unicode
é
	U+00E9     Unicode
	0x00, 0xE9 UCS2 Encoded Unicode
θ (theta)
	U+03B8      Unicode
	0x03, 0xB8 UCS2 Encoded Unicode
€ (euro)   
	U+20AC     Unicode
	0x20, 0xAC UCS2 Encoded Unicode

UCS2_High_Byte=Unicode&&0xFF00;
UCS2_Low_Byte=Unicode&&0x00FF;
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top