Special Characters break Text Capture Tool

When Using the Text Capture Tool, the Export stops at some special characters. While at least most characters are exported fine (I’m sure about “ä”, “ö”, “ü”, “ß” and “á”), some others (I found “ă” as in Armată and “ű” as in Könnyű so far) will not only not export, but end the text-File right there.

For example, if I have the 6th Könnyühadosztály and it’s evil brother 666th Könnyűhadosztály the export file looks like this:

2546: 6. Könnyühadosztály (2/2)
2547: 666. Könny

And no further export takes place, the unit in 2548 is not listed at all.

Where is the Text Capture Tool? What are the steps for reproducing the problem exactly?

The editor allows to add a “Text Capture Tool”. It’s a menu entry right in “Main Map” right under “Image Capture Tool”.

When you are in a game you can press the button and it will save a list of all units and the locations they are in.

I have created a mini-module with three hexes and three units. If I set it up like this and then use the Text Capture, the written file will look like this:

“0201: 6. Könnyühadosztály (6th)
0202: 666. Könny”

Könnyűhadosztály is Hungarian for “Light Infantry Division”, by the way. It may not have been the wisest of choices to use very, very special characters in naming units; but Vassal itself works just fine and shows no problems. It’s just the text export that fails.
Text Export TestMap

Would you upload your module somewhere I can get it? That would expedite troubleshooting.

Sorry, should have done that earlier:


Thanks for the test module. It works as expected for me, presumably because I’m using a UTF-8 locale.

This line in TextSaver is the cause of the problem:

try (Writer bw = Files.newBufferedWriter(file.toPath(), Charset.defaultCharset());

I’ll bet whatever Charset.defaultCharset() is for you, it’s not capable of representing the full range of Unicode characters.


Try one of the VASSAL-3.6.5-SNAPSHOT-694c309-write_utf8 builds. Does it work for you with that?


Wonderful! I didn’t even know that Windows 10, 64 bit(Version 20H2, Build 19042.1466) (German Region) didn’t have full UTF-8 support and how to enable it.

But the build worked perfectly! All names are exported correctly:

(I created a newer version at the same link, in case anyone wants to try)

0202: Română «M» (Română «M»)
0203: Könnyü Română Armată № 1 (Könnyü Română Armată № 1)
0201: Romana “M” (Romana “M”)

(Using VASSAL-3.6.5-SNAPSHOT-694c309-write_utf8-windows-x86_64.exe)

1 Like

And I forgot to utter a big “Thank you!”. Identifying and fixing a problem in less than 8 hours (and that includes delays because I wasn’t online all the time) is mightily impressive!

So, thank you for the great work!


Thanks for providing what I needed for troubleshooting. The fix will be in the 3.6.5 release.