0

I have a request to sort array of Strings but not using default encoding. I need to convert it to "IBM500" to sort it, and to convert the result to default encoding and return it.

We already have a function in db that is doing that but we need to reimplement this with Java. I don't have much experience with encoding, so every hint or example would be great!

Djordje Ivanovic
  • 4,151
  • 4
  • 27
  • 49
  • You are mixing concepts, or not telling the whole story; an encoding cannot determine the sorting order of strings (well, to be exact, when talking text, that should be the _collating_ order). Can you be more precise? – fge Sep 29 '15 at 21:58
  • 3
    Would [Java comparator for String in EBCDIC encoding](http://stackoverflow.com/questions/24525015/java-comparator-for-string-in-ebcdic-encoding) work for you (using `IBM500` instead of `IBM1047` as the encoding)? – Mick Mnemonic Sep 29 '15 at 22:02
  • Thanks for the answers. Mick, this is exactly what I need. Please add it as answer so I can accept it! – Djordje Ivanovic Sep 30 '15 at 06:22

0 Answers0