[Bug 755414] New: YCP substring() function is not UTF-8 safe
https://bugzilla.novell.com/show_bug.cgi?id=755414 https://bugzilla.novell.com/show_bug.cgi?id=755414#c0 Summary: YCP substring() function is not UTF-8 safe Classification: openSUSE Product: openSUSE 12.2 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: YaST2 AssignedTo: mvidner@suse.com ReportedBy: lslezak@suse.com QAContact: jsrain@suse.com Found By: Development Blocker: --- When fixing bug bnc#728588 it turned out that the YCP substring() function uses byte units instead of UTF-8 characters as expected. This causes buggy behavior when iterating over a string in YCP code. Example: size("áa") => 2 but substring("áa", 1, 1) => "\0xF1" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=755414 https://bugzilla.novell.com/show_bug.cgi?id=755414#c2 --- Comment #2 from Arvin Schnell <aschnell@suse.com> 2012-04-03 13:35:22 UTC --- YCP has a function lsubstring for that, see bug #446996. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=755414 https://bugzilla.novell.com/show_bug.cgi?id=755414#c3 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsmeix@suse.com Platform|Other |All Summary|YCP substring() function is |YCP string builtins like |not UTF-8 safe |the substring() function | |are not UTF-8 safe OS/Version|Other |All --- Comment #3 from Johannes Meixner <jsmeix@suse.com> 2012-04-04 10:04:13 UTC --- Extra functions for UTF8 encoded strings are not needed because since ever the YCP data type string consist of UNICODE characters encoded in UTF8. See the documentation e.g. old one for SLE10 http://doc.opensuse.org/projects/YaST/SLES10/tdg/id_ycp_data_string.html and the same in newer one e.g. for openSUSE 11.3 http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/id_ycp_data_string.ht... Therefore all "YCP String Builtins" as listed in http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/Book-YaSTReference.ht... must work with UTF8 encoded strings. In this context https://bugzilla.novell.com/show_bug.cgi?id=446996#c16 "Multibyte strings are an area of the YCP language that missed the train when SUSE switched to UTF8 arouns SL 8" looks really surprising - at least from my point of view - oor I completely misunderstand something here... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=755414 https://bugzilla.novell.com/show_bug.cgi?id=755414#c4 Arvin Schnell <aschnell@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Arvin Schnell <aschnell@suse.com> 2012-06-13 11:49:34 UTC --- Fixed in yast2-core for openSUSE 12.2. Functions like substring work on unicode characters now. That does not mean that splitting a string at any position does what you might expect, e.g. splitting a string between combining characters can still give strange results. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com