-
Notifications
You must be signed in to change notification settings - Fork 254
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
Upgr fixes #8259
Upgr fixes #8259
Conversation
Signed by Shawn Bulen, [email protected]
Signed by Shawn Bulen, [email protected]
The latest change introduced an error:
|
D'oh! |
Please note also that I'd be hesitant to assume the "u" modifier is OK - a lot of these old DBs are probably not utf8. Many aren't even ISO-8859-1... Some are ISO-8859-2+, for other language support back in the day... I helped one VERY LARGE forum (lcdtvthailand) migrate forward from TIS-620... I'm not sure I know what the "u" modifier will do to that. Part of this is why I left the truncate function alone, as noted in my comment. OTOH... I do think that it is quite possible that the EXACT logic used in Load.php might work, because all the vars are defined at that point in the upgrader (maybe moved a few lines lower after $utf8 is declared)... Line 222 in 6996e04
|
I know I am often too conservative on these things, but... I'd rather run with what's been working for the last umpteen years... |
It will be fine. All those old 8-bit character sets will be divided up by this regex correctly. If we were trying to analyze the characters, we'd get into trouble, because the bytes beyond 7F would mean different things in different character sets. But we're just splitting them, so as long as each character is just one byte (which they are), it doesn't matter what they map to in this or that character set. Indeed, the only reason I used the
That's the thing. It hasn't been. It cuts in the middle of entities. That's how the problems with broken entities in the log_search_subjects table happened. |
... Actually, just in case, I will go ahead and change it so that it doesn't use the |
Fixes #7799
Also adds $smcFunc['truncate'], used when building log_search_subjects via text2words() in old 1.0.x migrations. This was causing fatal errors when running the upgrader against 1.0.x & yabbse1.5.5.
Needed to get this line:
SMF/Sources/Subs.php
Line 5332 in 454e67f
To behave like the prior version for the upgrade:
SMF/Sources/Subs.php
Line 5325 in 19a9de6
Note that $smcFunc['truncate'] is actually pretty involved & factors in entity encoding...
SMF/Sources/Load.php
Line 222 in 454e67f
But to port over all the portions of Load.php into upgrade.php to make that work felt like overkill. Opted to just match the prior logic, which has been used for years.