Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Blomdell
LabComm
Commits
34c0d9cd
Commit
34c0d9cd
authored
9 years ago
by
Anders Blomdell
Browse files
Options
Downloads
Patches
Plain Diff
Made java decoding of strings to explicitly use UTF8
parent
3516e518
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/java/se/lth/control/labcomm2014/DecoderChannel.java
+4
-1
4 additions, 1 deletion
lib/java/se/lth/control/labcomm2014/DecoderChannel.java
with
4 additions
and
1 deletion
lib/java/se/lth/control/labcomm2014/DecoderChannel.java
+
4
−
1
View file @
34c0d9cd
...
...
@@ -5,9 +5,12 @@ import java.io.DataInputStream;
import
java.io.InputStream
;
import
java.io.IOException
;
import
java.io.EOFException
;
import
java.nio.charset.Charset
;
public
class
DecoderChannel
implements
Decoder
{
private
final
Charset
UTF8_CHARSET
=
Charset
.
forName
(
"UTF-8"
);
private
DataInputStream
in
;
private
DecoderRegistry
def_registry
=
new
DecoderRegistry
();
private
DecoderRegistry
ref_registry
=
new
DecoderRegistry
();
...
...
@@ -131,7 +134,7 @@ public class DecoderChannel implements Decoder {
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
chars
[
i
]
=
in
.
readByte
();
}
return
new
String
(
chars
);
return
new
String
(
chars
,
UTF8_CHARSET
);
}
public
int
decodePacked32
()
throws
IOException
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment