If I had to guess it would have to do with processing pure bytes without
considering encoding and hence multi-byte characters.

I'd be willing to guess that's a fundamental implementation flaw
potentially down to the telnet protocol itself.

:(


On Thu, Sep 15, 2022 at 3:46 AM David Leangen (OSGi) <o...@leangen.net>
wrote:

> Hi!
>
> I am having trouble using UTF-8 characters with the Gogo Shell.
>
> I have implemented a command “register” that takes a string argument. I
> try to run it like this:
>
> g! register 何か漢字で書いてる言葉
>
> The string gets parsed as "何㠋漢字㠧書㠄㠦る言葉” instead of
> “何か漢字で書いてる言葉”. Not even sure what encoding that is.
>
> I checked the stack trace in debug mode to ensure it wasn’t my code. It
> seems to me that from the moment the text is input into the shell it gets
> interpreted that way (all the way up the stack trace).
>
> I tried echo as well:
>
>
> ```
> g! echo こんにちは
> ã “ã‚“ã «ã ¡ã ¯
> ```
>
>
> I already checked out a few threads and tried those fixes, but no luck:
>
>  *
> https://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding/623036
>  *
> https://stackoverflow.com/questions/8920712/osgi-bundle-doesnt-display-utf-8-characters
>
>
> I updated my gogo shell to the latest available version on Maven Central.
>
>
> Any other ideas about how I could resolve this issue?
>
>
> Thanks!
> =David
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>

-- 
*Raymond Augé* (@rotty3000)
Senior Software Architect *Liferay, Inc.* (@Liferay)
OSGi Fellow, Java Champion

Reply via email to