Closed yduke closed 4 years ago
I'm confused. If each Chinese 1 character is counted as 2 characters, wouldn't a slicePoint of 120 put 60 characters in the summaryText?
@kswedberg LOL forgive my math, actually I've tried to count the output characters manually, a bit odd that they are not exactly the number as we set, nor 1/2, I set slicePoint to180 or 200, the summary text could sometimes be the same, both english or chinese, would that be a utf-8 problem? It there a better way to fix this?
thanks for the report. I'm finally looking into this. It's such an old plugin that I can't get my tests to run, so it might take a while
@yduke It looks like I already have a test for Chinese characters. Can you try using the following options object?
{
preserveWords: false,
widow: 0
}
Sorry for this late reply, I've been busy with other projects. It is working with your solution. Thank you @kswedberg, good job! :100:
Hi, I've tried jQuery expander on Chinese web pages, as a result, each 1 Chinese character will be counted as 2 characters, so if I set slicePoint: 120, there are actually 240 Chinese characters will be put into the summaryText.