1211
AI's take on XML (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] Batman@lemmy.world 59 points 1 week ago
[-] renzev@lemmy.world 62 points 1 week ago* (last edited 1 week ago)
[-] clb92@feddit.dk 27 points 1 week ago

Lots or file formats are just zipped XML.

I was ~~reverse engineering~~ fucking around with the LBX file format for our Brother label printer's software at work, because I wanted to generate labels programmatically, and they're zipped XML too. Terrible format, LBX, really annoying to work with. The parser in Brother P-Touch Editor is really picky too. A string is 1 character longer or shorter than the length you defined in an attribute earlier in the XML? "I've never seen this file format in my life," says P-Touch Editor.

[-] SzethFriendOfNimi@lemmy.world 9 points 1 week ago* (last edited 1 week ago)

Sounds like it’s actually using XSLT or some kind of content validation. Which to be honest sounds like a good practice.

[-] clb92@feddit.dk 8 points 1 week ago* (last edited 1 week ago)

Here's an example of a text object taken from the XML, if you're curious: https://clips.clb92.xyz/2024-09-08_22-27-04_gfxTWDQt13RMnTIS.png

EDIT: And with more complicated strings (like ones havingnumbers or symbols - just regular-ass ASCII symbols, mind you) there will be tens of , because apparently numbers and letters don't even work the same. Even line breaks have their own . And if the number of these and their charLen don't match what's actually in pt:data, it won't open the file.

[-] SzethFriendOfNimi@lemmy.world 1 points 1 week ago* (last edited 1 week ago)

Is it because of the lower case Latin æ since it’s technically one character even if two bytes?

[-] clb92@feddit.dk 3 points 1 week ago
[-] SzethFriendOfNimi@lemmy.world 1 points 1 week ago

What a mess… sounds like the devs got burned by various Unicode edge cases RTL, etc

load more comments (5 replies)
load more comments (5 replies)
this post was submitted on 08 Sep 2024
1211 points (98.2% liked)

Programmer Humor

32041 readers
1257 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS