getBytes() is deprecated, no? I think there's an overload that takes an encoding that you should use (utf-8).