Skip to main content

How do display a text of Japanese font from show file.

5 replies [Last post]
Joined: 2010-03-03


I have to draw a Japanese text(shift-jis) from show file.
but, The result through the compiler is a garbled text.

Does the method to solve this issue have only the editing of the compiler?

Message was edited by: blive159

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-02-13

The GRIN compiler uses Unicode and UTF-8 throughout. So, just write the text file that contains the show out in UTF-8, and it should work fine.

I just grepped around for the string "UTF-8" in the source repository, and it comes up in a bunch of places. The one that's probably relevant here is this one, at line 2967 of AuthoringTools/grin/jdktools/library/src/com/hdcookbook/grin/io/text/

2959 try {
2960 URL source = AssetFinder.getURL(showName);
2961 if (source == null) {
2962 throw new IOException("Can't find resource " + showName);
2963 }
2964 rdr = new BufferedReader(
2965 new InputStreamReader(source.openStream(), "UTF-8"));
2967 ShowParser parser = new ShowParser(rdr, showName, show, builder);
2968 parser.parse(); // populates show
2969 rdr.close();
2970 } finally {

I guess you could add a command-line argument to the GRIN compiler to accept a character set, but I bet it would take a while to find every place throughout the workflow that might depend on character set. For simplicity, we just went with UTF-8 everywhere. I'd recommend sticking with this. When I've had charset issues in the past, I've just read in the file using Apple's "textedit," then written it back out with the option that lets me pick the charset. Of course, it's easy enough to automate this kind of stuff, too.

By the way, I'd love to hear more about a BD-J project in Japan! I may be a fan of Analoguma, but digital is good, too.



Joined: 2010-03-03

Hi. billf.
Thank you for your quick response.
The issue was settled, thanks to your effort.

By the way, In Japan, BD-J especially used to the Animation title.
And unfortunately I don't know the Analoguma...

Joined: 2009-09-01

BD-J still lacks the upsurge in Japan...

O/T Analoguma

Joined: 2006-11-08

For non-Japanese readers who are intrigued to see Analoguma (analog bear)...

His rival, Chidejika (digital deer), can be seen here:

Joined: 2010-03-03

Thank you for useful information!
The Analogma is so funny.
I regretted that I did not know the character...