dig-team / amie

Mavenized AMIE+Typing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

To support chinese output

XXp4ngXX opened this issue · comments

Hi, I notice that ByteString can't support chinese output, it will cause some mistaken code. ByteString tranform 1 byte, but chinese need to 2 bytes to represent.
@lajus
In KB.java

private static ByteString _compress(CharSequence s) {

		if (s instanceof ByteString) {
			return (ByteString) s;
		}
		String str = s.toString();
		int pos = str.indexOf("\"^^");
		if (pos != -1)
			str = str.substring(0, pos + 1);

		return ByteString.of(str);
	}

how do i change the code to make chinese output available?

Thanks, I just change all ByteString to String and get the output