[encoding]Stupid question regarding encoding
- From: Daniel Moyne <dmoyne@xxxxxxxxxx>
- Date: Mon, 19 Feb 2007 10:55:26 +0100
I have written a java plugin for an application that reads a file to execute
a series of actions ; when I parse my text file I check for the existence
of the following line "#HEADER" ; it works fine on my equipment ; on
Windows somebody working with the text file encoded in utf-8 told me that
there is problem as the line containing "#HEADER" is not found !
Now I am a little bit puzzled about all this :
(a) when you write java code and compile it what happens to the
string "#HEADER" because it will be used in the following test :
if (line.equals("#HEADER") {...}
where line is read from the text file with encoding as is on the machine
where the class is executed ? in other words you are comparing what to
what ?
(b) when with a Java app you read a text file can you get its encoding
format like utf-8 or ANSI or whatever to decide about some actions to be
taken ?
I think the problem could be easily solved by replacing "#HEADER"
by "_HEADER" but I have to go to the bottom of this to understand what is
going on.
Thanks
.
- Follow-Ups:
- Re: Stupid question regarding encoding
- From: a249
- Re: Stupid question regarding encoding
- Prev by Date: Re: Gernerics Linked List
- Next by Date: hi i have a query regarding inheritance
- Previous by thread: attn: elva - really colorful nntp access - satgu - (1/1)
- Next by thread: Re: Stupid question regarding encoding
- Index(es):
Relevant Pages
|