eishay / jvm-serializers

Benchmark comparing serialization libraries on the JVM
http://groups.google.com/group/java-serialization-benchmarking
3.28k stars 560 forks source link

Add support for Non-ASCII characters? #68

Closed fishercoder1534 closed 7 years ago

fishercoder1534 commented 7 years ago

This might be a dumb question, I'm not able to run this project with non-ASCII test case, but as the wiki says, it should be.

The wiki says: "Other test data will yield different results (e.g. adding a non ascii char to every string :-) ). "

And I used one non-ascii word in the test, but got "invalid character in string literal: #c2a4", here's how I'm using it:

Images = [ { Uri = "http://javaone.com/keynote_large.jpg" Title = Set: "14K 스와로브스키 시그니티 1캐럿 목걸이_NC110" Width = 1024 Height = 768 Size = Large } { Uri = "http://javaone.com/keynote_large.jpg" Title = Set: "보쉬 두루마리 100P 파우치세트 드릴비트 100PCS 보쉬 100PCS GSB10RE " Width = 1024 Height = 800 Size = Large } ]

It's complaining at this line: Title = Set: "14K 스와로브스키 시그니티 1캐럿 목걸이_NC110"

The Title field is String.

How can I enable non-ASCII for testing?

Thanks a lot!

cakoose commented 7 years ago

I think non-ASCII used to work, so maybe something broke... I'll test later tonight.

On Wed, Nov 30, 2016 at 4:56 PM, fishercoder1534 notifications@github.com wrote:

The wiki says: "Other test data will yield different results (e.g. adding a non ascii char to every string :-) ). "

And I used one non-ascii word in the test, but got "invalid character in string literal: #c2a4", here's how I'm using it:

Images = [ { Uri = "http://javaone.com/keynote_large.jpg" Title = Set: "14K 스와로브스키 시그니티 1캐럿 목걸이_NC110" Width = 1024 Height = 768 Size = Large } { Uri = "http://javaone.com/keynote_large.jpg" Title = Set: "보쉬 두루마리 100P 파우치세트 드릴비트 100PCS 보쉬 100PCS GSB10RE " Width = 1024 Height = 800 Size = Large } ]

It's complaining at this line: Title = Set: "14K 스와로브스키 시그니티 1캐럿 목걸이_NC110"

The Title field is String.

How can I enable non-ASCII for testing?

Thanks a lot!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eishay/jvm-serializers/issues/68, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOpddPPLvxlWRP5q9U6cot9esAjbPBRks5rDhtOgaJpZM4LA4Uf .

fishercoder1534 commented 7 years ago

@cakoose Thanks! I'm looking forward to your reply.

fishercoder1534 commented 7 years ago

Ping... sorry for pushing it. But any updates would be greatly appreciated!

cakoose commented 7 years ago

Sorry, it took a little more work than I thought it would.

I pushed a fix. You now specify the test files in ".json" files (instead of ".cks" files). The format is standard JSON except "//" comments are allowed.

("cks" was a format I worked on several years ago... I haven't kept it updated so I decided to just remove it.)

On Thu, Dec 1, 2016 at 3:49 PM, Steve Sun notifications@github.com wrote:

Ping... sorry for pushing it. But any updates would be greatly appreciated!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eishay/jvm-serializers/issues/68#issuecomment-264331818, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOpdYvYBxqNDFXjoIA0XpqdAAL0X1-nks5rD10YgaJpZM4LA4Uf .

fishercoder1534 commented 7 years ago

Excellent! Thanks so much for your effort! It helped me a lot! @cakoose