Feb. 1st, 2012

mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
[staff profile] mark
[commit: http://hg.dwscoalition.org/dw-free/rev/8b78cdfc4bc2]

Fix issue with truncated picture keywords

The summary here is that sometimes, when people use characters that are not
standard Latin (i.e., when the byte value is higher than 0x7f), sometimes we
get in a situation where the LJ::text_trim function cuts off the right edge
because it assumes UTF-8 input and the input isn't.

The solution is to encode it as UTF-8, which is what this patch does. This
patch also re-enables the comment updating since that's the only way to fix
the situation where someone has run into this bug. Simply re-importing will
fix any broken comments.

This was a pain to track down.

Patch by [staff profile] mark.

Files modified:
  • cgi-bin/DW/Worker/ContentImporter/LiveJournal/Comments.pm
Diff: 1 file changed. )
Page generated Jun. 21st, 2025 05:16 am
Powered by Dreamwidth Studios