问题
we have an application written in Java which reads some text generated by a VB6 application. The problem is: this VB6 application generate this output using some special characters, like ç,ã,á which we don't know in what charset.
So the question is: is there a default charset used by VB6? Which is it?
回答1:
how do you transfer the data from one to the other? via file? if yes then it uses the machine default encoding i don't know the java code to get it, but in c# its Encoding.Default...
回答2:
Well,
here is what we discovered: We don't know if that was because our VB6 application was executed on the command line,but it was actually using the MS-DOS environment default charset, which in our case was the windows-1252.
So, all we had to do was to change our Java code to something like this:
InputStreamReader inputReader = new InputStreamReader(input, "windows-1252");
and it just worked fine!
Maybe it's even not because of the MS-DOS environment, but because we are getting this data from a Microsoft Access database. Personally, I think that this is the most probably solution for our problem.
来源:https://stackoverflow.com/questions/2049272/what-is-the-default-vb6-charset