我在 CodeIgniter 中的文本与具有拉丁字符的文本有问题。
我在inputext中写:Solución
并按下按钮保存,但在数据库中出现:solución
显然当我在网站上获取数据时显示:solución
我在数据库中插入了这个词más
,并在网站上显示más
,这不是问题。
我在 Intellij IDEA 12 中使用 JSF、java、openjpa。我使用 MySql,在 sql 脚本中说:
CREATE DATABASE IF NOT EXISTS `ciclos_calidad` /*!40100 DEFAULT CHARACTER SET utf8 */;
我有:
<h:form>
<h:inputext value="#{hi.word}/>
<h:commandbutton actionlistener="#{hi.save()}" value="Save"/>
</h:form>
在java中我有:
@ManagedBean(name = "hi")
@ViewScoped
public class hi{
private String word;
private HiController hiController;
@PostConstruct
public void init(){
...
}
...
/*getter and setter*/
...
public void save(){
hiController.save(word);
}
}