java - conwert object which contains strings with utf-8 to string with proper coding -
i'm processing mms , got text part :
mmsbodypart.getcontent();
it's simpy object. need convert string using utf-8. have tried:
string contenttext = (string) mmsbodypart.getcontent();
but doesn't works specyfics characters , strange chars appear. tried :
string content = new string(contenttext.getbytes("utf-8"), "utf-8"));
not mystery failed.
how can done ?
edit: problem caused bad encoding in file. nothing wrong in code, ya didn't thought in first place...
strings
haven't encoding in java. if need one, should use byte[]
encoding string
Comments
Post a Comment