OrientDB在使用Unicode,土耳其语和枚举时遇到问题

Yas*_*muş 6 java turkish utf-8 character-encoding orientdb

我正在使用一个具有枚举类型的lib,这些类似于consts;

Type.SHORT
Type.LONG
Type.FLOAT
Type.STRING
Run Code Online (Sandbox Code Playgroud)

当我在Eclipse中调试时,我收到一个错误:

No enum const class Type.STR?NG
Run Code Online (Sandbox Code Playgroud)

当我使用土耳其语系统时,工作i>İ有一个问题,但因为这是一个enum const,即使我把每个属性都设置为UTF-8,也没有什么可以让STRING成为Eclipse应该寻找的东西.但它仍然在寻找STRİNG,它无法找到,我无法使用它.我该怎么做?

项目>属性>资源>文本文件编码现在是UTF-8.问题仍然存在

编辑:更多信息可能会提供一些我无法得到的线索; 我正在开发OrientDB.这是我的第一次尝试,所以我不知道问题可能出在OrientDB软件包上.但是我使用了很多其他的库,我从未见过这样的问题.这个包中有一个OType枚举,我只是想连接数据库.

    String url = "local:database";
    ODatabaseObjectTx db = new ODatabaseObjectTx(url).
    Person person = new Person("John");
    db.save(person);
    db.close();
Run Code Online (Sandbox Code Playgroud)

我还没有更多的代码.创建数据库,但后来我得到java.lang.IllegalArgumentException:

Caused by: java.lang.IllegalArgumentException: No enum const class com.orientechnologies.orient.core.metadata.schema.OType.STR?NG
    at java.lang.Enum.valueOf(Unknown Source)
    at com.orientechnologies.orient.core.metadata.schema.OType.valueOf(OType.java:41)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateProperty.parse(OCommandExecutorSQLCreateProperty.java:81)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateProperty.parse(OCommandExecutorSQLCreateProperty.java:35)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:43)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:28)
    at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:63)
    at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63)
    at com.orientechnologies.orient.core.metadata.schema.OClassImpl.addProperty(OClassImpl.java:342)
    at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createProperty(OClassImpl.java:258)
    at com.orientechnologies.orient.core.metadata.security.OSecurityShared.create(OSecurityShared.java:177)
    at com.orientechnologies.orient.core.metadata.security.OSecurityProxy.create(OSecurityProxy.java:37)
    at com.orientechnologies.orient.core.metadata.OMetadata.create(OMetadata.java:70)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.create(ODatabaseRecordAbstract.java:142)
    ... 4 more
Run Code Online (Sandbox Code Playgroud)

这是OType类:http://code.google.com/p/orient/source/browse/trunk/core/src/main/java/com/orientechnologies/orient/core/metadata/schema/OType.java

和其他班级; OCommandExecutorSQLCreateProperty:http: //code.google.com/p/orient/source/browse/trunk/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLCreateProperty.java

第81行说: type = OType.valueOf(word.toString());

Jör*_*ann 6

我是否正确假设您使用土耳其语区域设置运行此程序?然后看起来这个bug在OCommandExecutorSQLCreateProperty的第118行:

linkedType = OType.valueOf(linked.toUpperCase());
Run Code Online (Sandbox Code Playgroud)

您必须指定应使用其上限规则的Locale,可能Locale.ENGLISH作为参数toUpperCase.