Author Topic: wxWidgets Debug Alert on XML import  (Read 1396 times)

Offline dannowatts

  • BeerSmith Apprentice Brewer
  • **
  • Posts: 4
  • BeerSmith 2 Rocks!
wxWidgets Debug Alert on XML import
« on: May 01, 2019, 04:36:14 PM »
hello, i tried importing a beer XML file (that was previously exported and saved from brew toad before they shut down) and received the following error:

"wxWidgets Debug Alert
../src/common/strconv.cpp(1188): assert "Assert failure" failed in FromWChar(): trying to encode undefined Unicode character" and then it has a call stack.

i am happy to include the beer xml file (if there's an appropriate email i can send it to) that i'm trying to import to help with debugging the issue (maybe a parsing issue with illegal/hidden/non-unicode standard characters?)

Offline dtapke

  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 452
Re: wxWidgets Debug Alert on XML import
« Reply #1 on: May 02, 2019, 12:21:07 PM »
I personally have no issue opening .xml files, you can attach the file here and i can see if i can open it?
32g eHERMS
Drinking: Dopplebock, NEIPA, Pils
Primary: empty
Secondary/Lagering:
Next Brew: RIS

Offline Kevin58

  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 552
  • God is great, beer is good and people are crazy
Re: wxWidgets Debug Alert on XML import
« Reply #2 on: May 02, 2019, 01:56:22 PM »
...
i am happy to include the beer xml file (if there's an appropriate email i can send it to)...

Use the "Attachments and other options" too just under the text box where you type your message.
If you?re stressing over homebrewing, you?re doing something wrong.
- Denny Conn

Offline dannowatts

  • BeerSmith Apprentice Brewer
  • **
  • Posts: 4
  • BeerSmith 2 Rocks!
Re: wxWidgets Debug Alert on XML import
« Reply #3 on: May 02, 2019, 02:57:24 PM »
i've spoken with brad smith, but wanted to follow up on my post here:
i think i may have solved the issue on my end for being able to import these beer xml's, and i'm wanting to share with everyone so it could hopefully help others encountering a similar issue & cause!

it seems as if there were some non-ascii characters in the beer xml's that needed to be corrected, attached are some screenshots showing the offending characters highlighted, and then the corrections that resolved the issue inside of beer smith.

the "Chateau Biscuit" ones are pretty easy to see and recognize visually as non-ascii characters.

but victory malt one i never would've seen by looking.
i was able to find and replace instances of offenders by doing a regex search for non-ascii characters (in my favorite ide, atom) using
Code: [Select]
[^[:ascii:]]
the suggestion i offered to brad was maybe beer smith could have some sort of "diacritics sanitation" before import? but for anyone coming here to this post, you could implement the same searching of your beer xml files before attempting to import them.

 

modification