Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
397 views
in Technique[技术] by (71.8m points)

java - Issues while converting utf-8 to arabic

Arabic Characters are coming in XML request without setting any character set in request header. in text file, characters are going correctly. but if we insert into oracle table, its going as ?o.?¨ (?′ù??±)

  1. manual insertion in table is going fine.
  2. tried conversion with different type codes: System.out.println(URLDecoder.decode(Value, "ISO-8859-9")); used ByteBuffer ByteArrayInputStream.
  3. one more thing is noticed: if we set charset=UTF-8 in header than all is going fine and if we print encoded string it prints as: utf-8 in header: 50+%D8%BA.%D8%A8+%28%D8%B4%D9%87%D8%B1%29 and if we didn't set the charset in header, then string prints as: 50+%C3%98%C2%BA.%C3%98%C2%A8+%28%C3%98%C2%B4%C3%99%C2%87%C3%98%C2%B1%29

and second string is going fine in text file.

please someone suggest something.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Do not just think its not going fine in DB change all the fonts and see in the Oracle DB. The Arabic characters is fine but sometimes are not supported by the current font you have selected in SQL developer


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...