slachiewicz / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

.json results file should be utf-8 always #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The VM's default charset is used to write the results file. I'm writing some 
code to read Caliper results files and wish I knew the encoding. Would it be 
better to have Caliper hard code the encoding to UTF-8?

Original issue reported on code.google.com by brianfromoregon on 23 Oct 2011 at 2:57

GoogleCodeExporter commented 9 years ago
I'm not sure.  I live in the world of server-side programs where it pretty much 
never makes sense to use the system default charset.  But for a command-line 
tool, it seems like the exact kind of thing that this setting was made for.  In 
other words, the encoding we want is "whatever your editor and other tools are 
going to use."

Original comment by kevinb@google.com on 24 Oct 2011 at 3:17

GoogleCodeExporter commented 9 years ago
+1 for UTF-8 everywhere. Everyone can read it and it avoids the need to 
transcode.

Original comment by jessewil...@google.com on 24 Oct 2011 at 7:23

GoogleCodeExporter commented 9 years ago
If the results file is meant to be examined by other programs, e.g. loaded into 
the user's editor, and is written using the user's environment (LANG and 
friends), it should be written using the default charset.  If it's a file 
format that expects a particular encoding (xml likes utf-8, perhaps?) then that 
encoding should be used.

Hopefully the vast majority of file contents will be utf-8 eventually, but 
we're not there yet.

Original comment by marti...@google.com on 14 Nov 2011 at 9:30

GoogleCodeExporter commented 9 years ago
Whoops: I was confused. I was thinking about cases like reading .caliperrc, and 
writing console output -- things that tend to stay put in the user's local 
environment.  But the .json results are an *interchange format* so of course we 
should standardize the encoding, and that means utf-8.

Original comment by kevinb@google.com on 14 Nov 2011 at 9:40

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 16 Nov 2011 at 8:35

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 5 Dec 2011 at 4:06