Anomie closed this task as "Invalid".
Anomie added a comment.

I see in the discussion that the user said https://tr.wiktionary.org/w/index.php?title=Mod%C3%BCl:tr-ad&oldid=2945196 raises an error which was fixed by https://tr.wiktionary.org/w/index.php?title=Mod%C3%BCl:tr-ad&diff=next&oldid=2945196. Looking at the change made, the issue is obvious: if you byte-reverse a UTF-8 string, as string.reverse does, the result is not valid UTF-8.

It has nothing to do with "Turkish letters which are not UTF-8" as claimed. If you can type a letter directly into an article on Wikipedia, it's a UTF-8 letter because MediaWiki as configured here won't accept non-UTF-8 either.

I think a more straightforward way of doing what they're trying to do with the reverse–replace-one–unreverse code there would be to just

sonAd = mw.ustring.gsub( sonAd, "[aAeEıIiİoOöÖuUüÜ]([^aAeEıIiİoOöÖuUüÜ]*)$", "%1")

BTW, I note that correctly implementing a "mw.ustring.reverse" would be surprisingly nontrivial to get right in the face of combining characters and such; see https://www.mediawiki.org/wiki/Extension_talk:Scribunto/Lua_reference_manual#mw.ustring_library_missing_reverse()_method for some past discussion.


TASK DETAIL
https://phabricator.wikimedia.org/T194153

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Anomie
Cc: Anomie, Aklapper, Lydia_Pintscher, thiemowmde, hoo, Lea_Lacroix_WMDE, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, SundanceRaphael, Wikidata-bugs, aude, Dinoguy1000, jayvdb, MrStradivarius, Jackmcbarn, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to