Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下字符串:
Ruby :: \u041D\u043E\u0432\u0438\u043D\u0438
我的问题是如何将其转换为 utf8 字符(在我的情况下是西里尔字母)?
在 Ruby 1.9 中:
"\u041D\u043E\u0432\u0438\u043D\u0438".encode("UTF-8") => "Новини"