Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: OldSchool on September 01, 2008, 03:44:44 PM

Title: E260 WPS problems r18378
Post by: OldSchool on September 01, 2008, 03:44:44 PM
Hello,

I'm just getting back to Rockbox after a few months. I have a custom WPS that has been working with a build from last March and I wanted to update it to the new WPS tag syntax and (eventually) to upgrade it using viewports. I've loaded a current build (r18378) and checked the new tag syntax. This WPS never used %P or %m and I've revised the progress bar line to the new syntax (%pb|bmp|x|y|width|height|).

I simply cannot get the new WPS to "take effect". In fact, I don't seem to be able to use anything but the default WPS. I've even tried removing the %pb line entirely with no change in behavior.

I have both config.cfg and fixed.cfg files (stored under \.rockbox) that reference my WPS (wps: /.rockbox/wps/WhilePlaying.wps). The file, WhilePlaying.wps, is stored in \.rockbox\wps, and all the image files used by the WPS are stored in \.rockbox\wps\WhilePlaying as .bmp files.

I thought that there might be a problem with the encoding of the text files and confirmed that it's UTF-8, however, the Rockbox text editor does not seem to display them correctly, so I'm still suspicious about the encoding. I use MS Notepad in W2K to create the files and write them with UTF-8 encoding.

I've been through this forum and found some similar problems reported, but none of the suggestions seem to help. Did I miss something? Any suggestions on how to trouble-shoot this would be much appreciated.

In the meantime, I'll keep bashing away at it and let y'all know if I get anywhere.

Title: Re: E260 WPS problems r18378
Post by: GodEater on September 02, 2008, 03:01:46 AM
Tried a simulator for the target your WPS is aimed at and run it with -debugwps ?
Title: Re: E260 WPS problems r18378
Post by: OldSchool on September 02, 2008, 10:51:15 PM
I tried "debugwps-background.bat". The WPS debugger didn't show up any problems and the simulator behaved the same way the target did (that is, no WPS screen).

Here's what I did find: When I edit the files with MS Notepad and do a "Save as...", with the encoding set to "UTF-8", the WPS doesn't work; if the encoding is set to "ANSI", it does. Any idea why? Shouldn't UTF-8 be identical if there aren't any non-ASCII characters in the file?

Thanks for suggesting the simulator though, it saves a lot of "head bashing" time.
Title: Re: E260 WPS problems r18378
Post by: LinusN on September 03, 2008, 01:51:40 AM
Here's what I did find: When I edit the files with MS Notepad and do a "Save as...", with the encoding set to "UTF-8", the WPS doesn't work; if the encoding is set to "ANSI", it does. Any idea why? Shouldn't UTF-8 be identical if there aren't any non-ASCII characters in the file?
It is not identical, because Notepad adds a UTF-8 BOM to the beginning of the file (0xef 0xbb 0xbf).
Title: Re: E260 WPS problems r18378
Post by: OldSchool on September 03, 2008, 12:48:39 PM
I gather the BOM is optional for UTF-8. Apparently, some editors (Notepad, Wordpad)put it in and others don't.

Oh well, it's been one of those "learning experiences".

Thanks.