10-11 11:29:33.181 20989-20989/me.xingcloud.shop.cateringpad.test W/Bundle: Attempt to cast generated internal exception:
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Intege
at android.os.BaseBundle.getInt(BaseBundle.java:801)
at android.os.BaseBundl
我是Haskell的初学者,我一直在兴高采烈地使用cabal来安装我认为可能需要的一切,假设它可以像port或homebrew一样工作,为我解决所有的依赖关系,并保持程序更新,这样它们就不会崩溃,等等。然而,现在当我尝试安装lenses库时,我收到了这样的消息:
In order, the following would be installed:
base-orphans-0.5.4 (new package)
distributive-0.5.0.2 (new version)
comonad-5 (new version)
bifunctors-5.4.1 (new package)
m
对于is 8859-1编码的字符串,将其转换为utf8的最优雅方法是什么?
String convertedString = new String(s.getBytes("UTF-8"), "UTF-8"); //is this correct, elegant etc?
注意,我知道已经存在类似于这个问题的问题,但我发现这些问题的答案不明确,并且没有显示整个转换过程。
编辑:更多关于我的问题的描述
//message is a String
//msg.setContent is this method http://docs.oracle.com/javae