From: Gary Wright Date: 2010-06-28T13:22:33+09:00 Subject: Re: Convert \uXXXX to character On Jun 27, 2010, at 8:33 AM, born in USSR wrote: > I have string: '\u041f\u0440\u0438\u0432\u0435\u0442!' and i need to > convert it to string such as 'привет!'. > I can convert string to '041f 0440 0438 0432 0435 0442', then convert to > decimal and at the end convert each code to character with function: If I understand you correctly you can leverage Ruby's parser to interpret your string literal: irb> x = '\u041f\u0440\u0438\u0432\u0435\u0442!' => "\\u041f\\u0440\\u0438\\u0432\\u0435\\u0442!" irb> eval("\"#{x}\"") => "Привет!" Be careful though with eval, make sure your string to be evaluated doesn't contain any untrusted code. Gary Wright