Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add some simple case modification functions to the expression parser #4255
initcap(string) - would force the first character to uppercase and the rest of the characters to lowere case for EACH word in the string.
upper(string) - would force all characters to uppercase
lower(string) - would force all characters to lowercase.
These functions should probably be UTF8 aware. Ideally they should be able to convert upper/lower case accented characters I believe there are functions in the [http://site.icu-project.org/ ICU] library that do this. Minimally, the functions should not damage UTF8 strings.
This addition would also aid simple string comparison in logical expressions...
I only mentioned libicu because I used it for another project where I needed to mess around with utf8 characters, otherwise, I'm pretty UTF8 illiterate too. It would probably be worth your time to spend 15 minutes on their web site. They also have a good example /usr/share/doc/libicu-dev/examples/case/ucase.c if you install the libicu-dev package on Debian.
I don't want to make this too complicated, my only concern is that as soon as we start doing case changes, we have to be aware of the encoding to do it correctly.
de-milestoning this one as I suspect it won't make it to 6.2
concerning libicu, it would be on my todo list to investigate using it or harfbuzz to replace the fribidi support we have (it isn't thread safe, and currently breaks seeding with mapcache. Wrapping the fribidi calls with a mutex is not an option as it is called far too often and will therefore be locking constantly)
added a commit
Sep 26, 2013
I isolate the layer that trigger that assert:
However I guess is better open a more specific ticket.
@tbonfort the assertion fail is resolved. Thx.
I try also to apply your hint for harfbuzz problem. I remove old build and reclone all , but still the harfbuff is not found.