Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Dynamic query with accents
Hi,
Is there any way of make dynamic query insensitive to accent marks? I am able to make it insensitive to upper or lower case but not when is related to accents mark
I've tried with ilike, but this two queries give different results:
entryQuery = UserLocalServiceUtil.dynamicQuery();
entryQuery.add(RestrictionsFactoryUtil.ilike("firstName", "%José%"));
results = UserLocalServiceUtil.dynamicQuery(entryQuery);
entryQuery = UserLocalServiceUtil.dynamicQuery();
entryQuery.add(RestrictionsFactoryUtil.ilike("firstName", "%Jose%"));
results = UserLocalServiceUtil.dynamicQuery(entryQuery);
Thanks in advance,
Regards
Just a guess: Are you 100% super extra extra sure that your database uses UTF-8 encoding?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™