-
-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some simple case modification functions to the expression parser #4255
Comments
Author: dmorissette |
Author: sdlime This addition would also aid simple string comparison in logical expressions... Steve |
Author: woodbri 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) |
What is the status of this issue right now? If Harfbuzz integration is enabled, then it can solve this issue as well. #2591. I would like to work on this. And would like to know the feasibility of this idea. |
I don't believe anyone is actively working on it... Adding functions to the parser is easy, it's the string handling/encoding that complicates matters. nandajavarma I'm not sure on what you'd like to work on though. |
Hi, is someone working on this issue ? |
I try your implement, but having this error in the webserver when try to do a getcapabilities. maplabel.c:277: msComputeTextPath: Assertion `ts->annotext && *ts->annotext' failed. |
@aperi2007 please provide a testcase |
I'm testing better..... It seem happened only on a my huge mapfile. :/ To use correctly the upper/lower/initcap is necessary to add an expression to the label section ? |
@aperi2007 can you provide backtrace from a debugger when the assertion fails please. |
Hi, I have install harfbuzz, but the cmake don't see it. perhaps this could be the issue ? |
For the harfbuzz/cmake issue, try starting from a fresh build directory (i.e. rm -rf * in build/). For the failed assertion, that should not be related, and even if it was I would like to get a backtrace in order to fix it. |
ok, I isolate the layer that trigger that assert:
However I guess is better open a more specific ticket. |
@aperi2007 no need for another ticket or testcase, I can reproduce with your layer definition |
fixed in 53c58d8 |
@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. |
Documentation updated in MapServer/MapServer-documentation@9410665 |
Reporter: woodbri
Date: 2012/03/20 - 01:13
Trac URL: http://trac.osgeo.org/mapserver/ticket/4255
There is a need to be able to modify text strings being presented as labels. Some simple functions added to the expression parser would solve this problem.
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.
The text was updated successfully, but these errors were encountered: