Bug - Fixed Accented characters & data files

StDoodle

Minion
While KoL seems to use html entities for most non-ascii characters, it makes a few exceptions, such as the fight text vs. the Floating Platter of Hors D'Oeuvres.

The fight text for said monster includes accented letters that, when saved to a data file via file_to_map() and reloaded via map_to_file(), are no longer correct.

For now, I'm using a couple of regular expressions to find and replace these accented characters, but there seems to be a significant overhead to each piece of string manipulation I do in ash, and doing a complete check for all of these characters would result in noticeable performance hits.

I don't know if this is really fixable -- I could understand if it would involve as much of a performance hit if done by mafia as it would in ash, and in that case I'll just chuck the fight page condensing I'm working on all together.

If it seems like I must be doing something wrong and these characters should round-trip ok, please let me know.
 

Bale

Minion
This is happening to OCD Data also for any items that have strange characters in their names. This was not a problem until recently.

I guess r8962 could have caused this?
 

StDoodle

Minion
Possible; I must admit I haven't really done any map saving / loading that used non-ascii characters before the last few days.

It's also worth noting that I've had failures to load maps a few times over the past couple of days, which has honestly never happened before that I can recall.
 

Winterbay

Active member
There is definitely something going on with this and the datacahing of files. Using 8963 leads to jabañero pepper not be recognized by Bale's OCD-script. But it did so in 8960 and earlier (tested in both).
 

holatuwol

Developer
Yeah, when it was reading the cached version of the data file, it was using your OS encoding rather than UTF-8. It should be fixed now, though.
 

Veracity

Developer
Staff member
When I ran the new version and started Bale's OCD Relay script, it still reported a bunch of uncategorized items. I set one of them to what it was before and said "save" - and now it correctly finds everything.

That seems a little odd; this was a fresh invocation of KoLmafia, so it shouldn't be using a "cached" version of the file, should it?

Still, it works fine now, so I'd say you fixed it.
 
Top