Download
(2 MB)
Download
Updated: 07/19/16 01:21 AM
Pictures
File Info
Updated:07/19/16 01:21 AM
Created:06/28/16 05:33 AM
Monthly downloads:10
Total downloads:7,489
Favorites:0
MD5:
pChat jpFix  Popular! (More than 5000 hits)
Version: 6.2.1
by: 2ch [More]
NO LONGER SUPPORTED!

The original pChat author is actively providing updates.

オリジナル作者が日本語対応してくれました!
今後このアドオンを更新することはありません。
オリジナルの方を使ってください pChat
Archived Files (6)
File Name
Version
Size
Uploader
Date
5.6
2MB
2ch
07/05/16 07:09 AM
5.5
2MB
2ch
07/01/16 12:59 PM
5.4
2MB
2ch
07/01/16 11:08 AM
5.3
2MB
2ch
06/30/16 11:16 AM
5.2
2MB
2ch
06/28/16 02:52 PM
5.1
2MB
06/28/16 05:33 AM


Post A Reply Comment Options
Unread 08/06/16, 10:38 PM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1019
File comments: 1531
Uploads: 31
I've pushed your fixs into the base pChat, many thanks again.
Report comment to moderator  
Reply With Quote
Unread 07/24/16, 02:42 AM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1019
File comments: 1531
Uploads: 31
Re: about --trim()

Originally Posted by 2ch
/script d("["..string.gsub("あいうえお","^%s*(.-)%s*$", "%1").."]")


is E3 81 A0
It matched "A0".

Multi-byte character that ends with "A0" will be garbled.
Thank you.
Report comment to moderator  
Reply With Quote
Unread 07/23/16, 08:00 PM  
2ch
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 12
Uploads: 12
about --trim()

/script d("["..string.gsub("あいうえお","^%s*(.-)%s*$", "%1").."]")
/script d("["..string.gsub("あいうえおだ","^%s*(.-)%s*$", "%1").."]")

is E3 81 A0
It matched "A0".

Multi-byte character that ends with "A0" will be garbled.
Report comment to moderator  
Reply With Quote
Unread 07/19/16, 03:11 PM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1019
File comments: 1531
Uploads: 31
Originally Posted by 2ch
Originally Posted by Ayantir
Hey..

What the changes in your fix compared to the original pchat ?.. I could integrate them directly.
Last version should b enought for JP users. did i missed something?
I'm afraid my expressions may be rude or hard to read, because I'm not so good at English.

12345678903bytes Number
abc1byte characters

UTF8
The 2nd byte of 2 bytes characters, and the 2nd,3rd byte of 3byte characters is the same range.
So,You must see at least 2 bytes in order to know it exactly.


And one more thing.

strippedLine = string.gsub(line,"^%s*(.-)%s*$", "%1")
I do not know why,It would be matched against the part of a multi-byte character.

I'm sorry a poor description
I have modified only this two places
Thank you for the answer !

1234567890 . I wasn't aware of those. On our occidental keyboards it's 1324567890 ..

For the multibytes chars I thinked too that JP chars had all 3 bytes .. Do you have an exemple of character for me ?

For the trim.. hum.. I'll need to see what is the issue. I could remove it too.
Report comment to moderator  
Reply With Quote
Unread 07/19/16, 02:43 PM  
2ch
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 12
Uploads: 12
Originally Posted by Ayantir
Hey..

What the changes in your fix compared to the original pchat ?.. I could integrate them directly.
Last version should b enought for JP users. did i missed something?
I'm afraid my expressions may be rude or hard to read, because I'm not so good at English.

12345678903bytes Number
abc1byte characters

UTF8
The 2nd byte of 2 bytes characters, and the 2nd,3rd byte of 3byte characters is the same range.
So,You must see at least 2 bytes in order to know it exactly.
splittedString = text:sub(splittedStart, splittedEnd)
splittedString2 = text:sub(splittedStart, splittedEnd-1)
-- 1byte
if (string.byte(splittedString,-1) < 128) then
UTFBytes = 0
-- 2nd or 3rd byte(2,3byte)
elseif (string.byte(splittedString,-1) >= 128) and (string.byte(splittedString,-1) < 192) then
-- 2nd byte(3byte)
if(string.byte(splittedString2,-1) >= 128) and (string.byte(splittedString2,-1) < 192) then
UTFBytes = 0
-- 1st byte(2byte)
elseif (string.byte(splittedString2,-1) >= 192) and (string.byte(splittedString2,-1) < 224) then
UTFBytes = 0
-- 1st byte(3byte)
elseif (string.byte(splittedString2,-1) >= 224) and (string.byte(splittedString2,-1) < 240) then
UTFBytes = 1
splittedEnd = splittedEnd + UTFBytes
splittedString = text:sub(splittedStart, splittedEnd)
end
-- 2byte
elseif (string.byte(splittedString,-1) >= 192) and (string.byte(splittedString,-1) < 224) then
UTFBytes = 1
splittedEnd = splittedEnd + UTFBytes
splittedString = text:sub(splittedStart, splittedEnd)
-- 3byte
elseif (string.byte(splittedString,-1) >= 224) and (string.byte(splittedString,-1) < 240) then
UTFBytes = 2
splittedEnd = splittedEnd + UTFBytes
splittedString = text:sub(splittedStart, splittedEnd)
end
And one more thing.
-- trim()
strippedLine = string.gsub(line,"^%s*(.-)%s*$", "%1")
strippedLine = string.gsub(line,"^%s*(.-)%s*$", "%1")
I do not know why,It would be matched against the part of a multi-byte character.

I'm sorry a poor description
I have modified only this two places
Report comment to moderator  
Reply With Quote
Unread 07/19/16, 09:55 AM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1019
File comments: 1531
Uploads: 31
Hey..

What the changes in your fix compared to the original pchat ?.. I could integrate them directly.
Last version should b enought for JP users. did i missed something?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: