views:

48

answers:

2

Where can I find some character decoders for the non-officially supported charsets? I.e. I don't want to reinvent the wheel, surely someone must have already written some decoders for their own purposes or as a library?

Thanks!

+2  A: 

There is JCharset offering a couple of missing charsets.

Peter Tillemans
Thanks! Unfortunately, it's far from enough. I mean, the more usual charsets that are on the net, are not included. Thanks for the bother!
Albus Dumbledore
Yeah, it are only a handful... You might get better response if you mention the charset you are looking for.
Peter Tillemans
I am looking for quite a few charsets: http://msdn.microsoft.com/en-us/library/aa752010(v=VS.85).aspx Except for the chinese/japanese/korean/hindi/hebrew/etc. I need all the others :-)
Albus Dumbledore
+2  A: 

The sources from libiconv will do perfectly! It's a pity that I'll have to write the code of the decoders myself, but the thanks to the fact that I need to support only single-byte encodings (apart from UTF-8), it's going to be a piece-of-cake job.

Thanks for the support!

Update

I've written my own reader with its decoders. AlbiteStreamReader provides the ability to read characters from encodings, not natively supported by Java's InputStreamReader:

  1. UTF-8,
  2. ASCII,
  3. ISO-8859-1,
  4. ISO-8859-2,
  5. ISO-8859-3,
  6. ISO-8859-4,
  7. ISO-8859-5,
  8. ISO-8859-7,
  9. ISO-8859-9,
  10. ISO-8859-10,
  11. ISO-8859-13,
  12. ISO-8859-14,
  13. ISO-8859-15,
  14. ISO-8859-16,
  15. WINDOWS-1250,
  16. WINDOWS-1251,
  17. WINDOWS-1252,
  18. WINDOWS-1253,
  19. WINDOWS-1254,
  20. WINDOWS-1257,
  21. KOI8-R,
  22. KOI8-RU,
  23. KOI8-U

And it works in J2ME, too.

Sources & binaries can be found at github.

Albus Dumbledore