| Author |
Has anyone gotten a question about UTF, etc
|
Rick Reumann
Ranch Hand
Joined: Apr 03, 2001
Posts: 281
|
|
Ok, one night to go before the exam and yes I should have looked into this more sooner..I know, I know. It seems like on every JQ+ test I get a question about encoding schemes (unicode, UTF8 ). Not coming from a computer science background I'm usually totally lost in conversations of such matters. I even did a search on here concerning this topic and people who know a lot more than me about it are often confused about it as well. This post in particular I was looking at http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=24&t=012999 Can maybe somone give me or point me to a real dummied down version of what I need to know concerning Unicode and UTF8 in relation to this exam. I've read and reread the chapters in RHE and Mughal and I'm still confused. The question came up on a JQ+ about how characters are stored internally in the JVM and I thought it was unicode but I was wrong. Even in Val's notes it says "Inside JVM, text is represented in 16 bit Unicode. For I/O, UTF is used. UTF uses as many bits as neeed to encode the character." Does this kind of question ever come up on the exam? I'm really flustered
|
 |
Erik Dark
Ranch Hand
Joined: Jan 28, 2002
Posts: 107
|
|
The question came up on a JQ+ about how characters are stored internally in the JVM and I thought it was unicode but I was wrong. Even in Val's notes it says "Inside JVM, text is represented in 16 bit Unicode. For I/O, UTF is used. UTF uses as many bits as neeed to encode the character."
I can't remember seen something like this (but that doesn't guarantee anything!) I wouldn't be afraid about this...certainly not you Rick....GoodLuck! Erik Dark
|
 |
Stephen Batsas
Ranch Hand
Joined: Jan 22, 2002
Posts: 117
|
|
This question might turn up. Remember that UTF8 is the default encoding JVM uses. Regards Stephen Batsas Sun Certified Programmer For Java[tm]2
|
 |
Rob Ross
Bartender
Joined: Jan 07, 2002
Posts: 2205
|
|
You should be clear on the distinction between internal JVM characters, and characters written to a DataOutputStream. Internally, ALL java characters are stored in Unicode, not UTF-8. This means that Strings are all composed of Unicode characters as well. When you write a String to a DataOutputStream using writeUTF8, it will write that String using UTF-8. Otherwise, if you just use writeChars you get Unicode characters as well. The internal, default encoding of the JVM is Unicode.
|
Rob
SCJP 1.4
|
 |
Brian Lugo
Ranch Hand
Joined: Nov 10, 2000
Posts: 165
|
|
|
Goodluck on your exam Rick! Keep us posted ...
|
 |
 |
|
|
subject: Has anyone gotten a question about UTF, etc
|
|
|