shpasspass
V2EX  ›  问与答

\u5ba2\u670d\u5728\u7ebf这个是由在线客服转成的什么字符?

  •  
  •   shpasspass · May 6, 2013 · 5753 views
    This topic created in 4836 days ago, the information mentioned may be changed or developed.
    就是qq浮动客服代码,http://www.51xuediannao.com/js/jquery/lrkf/demo.html
    我想把这个在线客服4个字改掉,发现他写在了js里,而且用的是\u5ba2\u670d\u5728\u7ebf,所以想问问大牛们,这是怎么做到的?怎么转换的?
    9 replies    1970-01-01 08:00:00 +08:00
    cutehalo
        1
    cutehalo  
       May 6, 2013
    就是这几个字的unicode编码
    11
        2
    11  
       May 6, 2013   ❤️ 1
    > unescape('\u5ba2\u670d\u5728\u7ebf')
    > "客服在线"
    swulling
        3
    swulling  
       May 6, 2013   ❤️ 1
    Unicode,python用decode('unicode_escape')就可以变成unicode string
    shpasspass
        4
    shpasspass  
    OP
       May 6, 2013
    @cutehalo
    @11
    @swulling
    对于我这个菜鸟,只能用网页版转换,但是把“在”这个字转换后,是在而不是u5ba2,这是为什么呢?
    shpasspass
        5
    shpasspass  
    OP
       May 6, 2013
    Jat001
        6
    Jat001  
       May 6, 2013   ❤️ 1
    Sublime Text 中有个插件,很方便。 https://github.com/seanliang/JavaPropertiesEditor
    cutehalo
        7
    cutehalo  
       May 6, 2013   ❤️ 1
    switch
        8
    switch  
       May 6, 2013   ❤️ 1
    這個簡單,直接在瀏覽器的地址欄輸入:

    javascript:alert(escape('客服在线').replace(/%/g, "\\")); void 0;
    shpasspass
        9
    shpasspass  
    OP
       May 6, 2013
    @switch 这个在chrome和ie里输入,都没东西。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2639 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 11:17 · PVG 19:17 · LAX 04:17 · JFK 07:17
    ♥ Do have faith in what you're doing.