将éàçè...替换为等价的“eace”在GWT中 [英] Replace éàçè... with equivalent "eace" In GWT

查看:235
本文介绍了将éàçè...替换为等价的“eace”在GWT中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过
s = Normalizer.normalize(s,Normalizer.Form.NFD).replaceAll([^ \\p {ASCII}],);
但是看起来GWT API不提供这样的功能。



我也试过:

  s = s.replace( é,E); 

但它不起作用



这个场景是我试图从单击的Widget的历史管理文本中获得令牌。

@okrasz foldToASCII()工作,但我发现了一个较短的在Java中将字符串转换为URL标准字符串


I tried s=Normalizer.normalize(s, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", ""); But it seems that GWT API doesn't provide such fonction.

I tried also :

s=s.replace("é",e);

But it doesn't work either

The scenario is I'am trying to générate token from the clicked Widget's text for the history management

解决方案

@okrasz, the foldToASCII() worked but I found a shorter one Transform a String to URL standard String in Java

这篇关于将éàçè...替换为等价的“eace”在GWT中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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