Encoding issue while converting .txt file to .xml file
I have a .txt file which has more 10000 lines in it and my requirement is to convert each line into an xml file. The encoding of the xml file is iso-8859-1. Everything is getting converted properly except the "NO-BREAK SPACE" which resembles a spac开发者_如何学运维e but isnt an actual space. It is getting converted to some other symbol(A with a cap). With the xml writer and the stream writer i'm using the encoding iso-8859-1 only.
Kindly help me to resolve this issue.
If txt file has more characters than iso-8859-1, you can't do this without loosing information.
Either switch to Unicode or require txt file in iso-8859-1.
精彩评论