那是什么编码(\\\О\\\д\\\р),以及如何让它恢复正常? [英] what is that encoding ( \u041e\u0434\u0440 ) and how to I get it back to normal?

查看:143
本文介绍了那是什么编码(\\\О\\\д\\\р),以及如何让它恢复正常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有这样的字符串

 title:\\\О\\\д\\\р\ u0438\\\н\\\я-\\\У\\\р\\\б\\\о\\\в\\\а ... 

将最佳方法恢复正常是什么?



我尝试过




$ string $ b $ string $ b $ string
$ b $ string

但没有运气,它保持不变。



谢谢

解决方案

这些是Unicode转义序列,最快的解码方式(非编程方式)只需将其粘贴到浏览器的控制台,引号:

 \\\О\\\д\\\р\\\и\\\н\\\я- $ОрнУУУУааааааааааа 
$ b

有几个这里的答案显示了如何用Java解码它们,例如:




Say i have a string like that

"title": "\u041e\u0434\u0440\u0438\u043d\u044f-\u0423\u0440\u0431\u043e\u0432\u0430 ...

What would be the best way of getting it back to normal?

I tried

byte[] b = stringBuilder.toString().getBytes();
String jstring = new String(b,"UTF-8");

yet no luck, it stays the same.

Thanks.

解决方案

Those are Unicode escape sequences. The quickest way to decode them (non-programmatically) is simply by pasting them into your browser's console, in quotes:

"\u041e\u0434\u0440\u0438\u043d\u044f-\u0423\u0440\u0431\u043e\u0432\u0430"
> "Одриня-Урбова"

There are a few answers here that show how to decode them in Java, for example:

这篇关于那是什么编码(\\\О\\\д\\\р),以及如何让它恢复正常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆