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
assertion botched running utf8 warnings #1207
Comments
From @jhiRobin Barker writes:
Strictly speaking the "ø" *is* a malformed utf-8 character...but -- |
From @gsarOn Tue, 22 Feb 2000 18:23:55 GMT, Robin Barker wrote:
I just fix this a few minutes ago. Sarathy Inline Patch-----------------------------------8<-----------------------------------
--- perl/toke.c.~1~ Tue Feb 22 09:54:06 2000
+++ perl/toke.c Tue Feb 22 09:54:06 2000
@@ -1298,9 +1298,9 @@
(void)utf8_to_uv((U8*)s, &len);
if (len == 1) {
/* illegal UTF8, make it valid */
- /* need to grow with 1 char to be safe */
char *old_pvx = SvPVX(sv);
- d = SvGROW(sv, SvCUR(sv)+2) + (d - old_pvx);
+ /* need space for one extra char (NOTE: SvCUR() not set here) */
+ d = SvGROW(sv, SvLEN(sv) + 1) + (d - old_pvx);
d = (char*)uv_to_utf8((U8*)d, (U8)*s++);
}
else {
End of Patch. |
Migrated from rt.perl.org#2188 (status was 'resolved')
Searchable as RT2188$
The text was updated successfully, but these errors were encountered: