Skip to content
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

[dev.icinga.com #8163] strtoupper() does not work with accented chars #1294

Closed
icinga-migration opened this issue Jan 5, 2015 · 4 comments
Closed
Labels
area/localization Affects the localization (i18n / l10n) bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/8163

Created by ccesario on 2015-01-05 18:13:48 +00:00

Assignee: jmeyer
Status: Resolved (closed on 2015-01-22 13:37:39 +00:00)
Target Version: 2.0.0-beta2
Last Update: 2015-01-22 13:37:39 +00:00 (in Redmine)


It seem that strtoupper() function does not work with accented chars.

Currently to fix it this function solves the problem.

mb_convert_case('atenção', MB_CASE_UPPER, 'UTF-8')

I don't know if this is the better wway, but fix the problem

It is attached 2 images, before and after usage mb_convert_case()

Attachments

  • after.png ccesario - 2015-01-05 18:13:06 +00:00
  • before.png ccesario - 2015-01-05 18:13:06 +00:00

Changesets

2015-01-22 13:37:07 +00:00 by jmeyer 6845480

Fix that strtoupper can't handle non ascii chars

Fixed by not using strtoupper or by using it prior
to the translation of the corresponding string.

fixes #8163

2015-04-09 11:08:49 +00:00 by jmeyer bc6a086

DataView\Comment: Do not permit `comment_author' to be queried

refs #8163

2015-04-10 10:17:52 +00:00 by jmeyer a51b93e

DataView\Contactgroup: Do not permit querying case-insensitive columns

refs #8163
@icinga-migration
Copy link
Author

Updated by jmeyer on 2015-01-15 13:10:19 +00:00

I'd opt for not utilizing strtoupper or any other function like this, just put those strings already upper cased in the translation catalog.

Every call to Host::getStateText($state, true) and Service::getStateText($state, true) is wrapped with strtoupper. There's no need for this in case the catalog already has the upper cased version. (Note the second parameter being true)

@icinga-migration
Copy link
Author

Updated by elippmann on 2015-01-16 08:20:44 +00:00

Hi Johannes,

Johannes wrote:

I'd opt for not utilizing strtoupper or any other function like this, just put those strings already upper cased in the translation catalog.

This would require us to provide both the vanilla string and a upper-case one for all strings we want to have upper-case. And this means always one extra string for translation.

We'll introduce mb_strtoupper.

Cheers,
Eric

@icinga-migration
Copy link
Author

Updated by jmeyer on 2015-01-22 12:40:39 +00:00

  • Status changed from New to Assigned
  • Assigned to set to jmeyer

@icinga-migration
Copy link
Author

Updated by jmeyer on 2015-01-22 13:37:39 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 6845480.

@icinga-migration icinga-migration added bug Something isn't working area/localization Affects the localization (i18n / l10n) labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.0.0-beta2 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/localization Affects the localization (i18n / l10n) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant