Since I've spent the last few work days dealing with character encoding issues I thought I would write up some useful points to remember.
1) Internally Java is excellent at maintaining character encoding, so you don't have to worry about how you deal with Strings and Characters within your application.
2) The points where character encoding will become an issue are at the boundaries, where you are sending or receiving data.
- When using streams to read/write data to/from a network connection or a file you should declare the encoding you want to use, e.g. "UTF-8".
- Ensure that any databases you interact with are correctly configured for the character encoding that you want to use. For example in SQLServer you will need to make sure that all String fields are either nvarchar or ntext, not the usual varchar and text types. You may also have to configure the database as a whole to ensure that connections use the correct encoding type.
3) Swing components will all support Unicode, however you will need to ensure that the font you are using supports the Unicode ranges that you are using. The default fonts delivered with Java will support most of the Unicode set, but this does not include Japanese, Chinese and Korean glyphs. MS Windows comes with "MS Arial Unicode", however you may be better off using code to find a font that will support the Unicode ranges that you need.
A good reference is the following;
buy from
3 comments:
coach outlet
valentino outlet
cheap basketball shoes
polo ralph lauren
oakley sunglasses
michael kors purses
cheap ray bans
seahawks jerseys
michael kors handbags clearance
coach outlet store online clearances
2017.2.23xukaimin
packers jerseys
ralph lauren
jordan uk
longchamp bags
cheap oakley sunglasses
louboutin pas cher
michael kors outlet store
cavaliers jerseys
ralph lauren outlet online
burberry sale
0405shizhong
michael kors handbags
adidas nmd
coach outlet online
gucci outlet online
le coq sportif shoes
fitflops sale clearance
adidas yeezy 350 v2
coach outlet
true religion uk
michael kors handbags
2017.4.28xukaimin
Post a Comment