joshlory / blockly-cdo

Automatically exported from code.google.com/p/blockly
Apache License 2.0
0 stars 0 forks source link

[to Title Case] block returns lower case letter when a comma without a space is used #146

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Select a print block.
2. Add a to UPPERCASE block.
3. Change UPPERCASE to Title Case.
4. Add a text block.
5. Type in 'hello,world' (no space, just the comma)

What is the expected output? 
Hello,World

What do you see instead?
Hello,world

What browser are you using?
Chrome Canary, Mozilla Firefox

Please provide any additional information below.

Original issue reported on code.google.com by azoun...@gmail.com on 15 May 2013 at 9:14

GoogleCodeExporter commented 8 years ago
Confirmed.  The JS and Python implementations behave differently.

This is a tricky problem.  It reopens Issue 47.  The question is what should 
the delimiter between words be?  When it was non-alphanumeric, Russian failed 
completely.  When it is whitespace, it is too restrictive (as you noted).

Taking a closer look at Python's str.title() function reveals that it fails the 
Russian case.  So we've basically got a no-win scenario.

I'm going to declare this a "Won't Fix".  Good bug, though.

Original comment by neil.fra...@gmail.com on 20 May 2013 at 6:33