Fixing the handling of blank talent tree names / icons + More unicode changes #17

Merged
merged 2 commits into from Aug 6, 2011

Conversation

Projects
None yet
2 participants
Contributor

Crote commented Aug 5, 2011

  • Blank talent trees now have 'None' as build name, the icon used with an empty build is now the question mark, as Blizzard does the same.
  • Corrected a small display error when showing builds ( the trailing ')' was missing after the talent numbers )

This fixes issue #3 ( #3 ) , although the naming of blank trees is debatable..

Edit: Come to think of it, calling it plainly 'Untalented' would probably be a lot better.

This also cleans up the mess I created with the previous pull request, I have absolutely no clue why I decided not to run a full batch of tests on that 'fix'.

Signed-off-by: Crote laurxp@gmail.com

Crote added some commits Aug 5, 2011

@Crote Crote Fixes bug #3 ( vishnevskiy#3 )
- Blank talent trees now have 'None' (or whatever you decide to put in that str) as build name, the icon used with an empty build will be the question mark, as Blizzard does the same.
- Corrected a small display error when showing builds ( the trailing ')' was missing after the talent numbers )

Signed-off-by: Crote <laurxp@gmail.com>
236335a
@Crote Crote Fixing unicode stuff, properly this time.
Let's hope this bloody piece of code now does what I want it to do....
Okay, so 2 things are rather obvious here:
1) The Character.name needs to be unicode.
2) The request url needs to be quoted, but this needs to be done from a utf8-encoded string.
Time spent searching for weird encoding bugs in just about every module called along the line: 3 hours? Probably more...
Time spent searching for places where quote() was actually called, then realising that normalize isn't only called from quote(): 3 seconds

Lesson learned here: If you're not exactly sure what's happening: For sanity's sake, start by drawing a flowchart or something.

I've tested this with character names akin to 'Crote', u'Crote', u'Çrôtè' and it all seems to work. 'Çrôtè' doesn't work, but that's working as intended, I guess. If you're smart enough to manually set the file encoding, you should also be able to add a 'u' before the strings you're dumping those special characters in.

Signed-off-by: Crote <laurxp@gmail.com>
89bb3ef

vishnevskiy merged commit e6f7c3b into vishnevskiy:master Aug 6, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment