string output bug in format.abc.Writer
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- data
Research direction
Start at format.abc.Writer and inspect its writeString method, using the supplied ABCWriter example as the behavioral reference. Verify that strings containing special characters are represented by their byte count and that the complete encoded data is written.
Written by the indexing model from the issue text.
Description
format.abc.Writer outputs the number of characters instead of the number of bytes when writing strings. This causes errors when outputting special characters. The following code fixes the problem:
class ABCWriter extends format.abc.Writer {
override function writeString( s : String ) {
var encoding = null;
#if neko
var b = untyped new Bytes(s.length,s.__s);
#else
var b = Bytes.ofString(s, encoding);
#end
writeInt(b.length);
o.writeFullBytes(b,0,b.length);
}
}
- Dominant language
- Haxe
- Stars
- 141
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HaxeFoundation/format
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
HaxeFoundation/format#111 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
HaxeFoundation/format#107 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
HaxeFoundation/format#102 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
HaxeFoundation/format#100 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
HaxeFoundation/format#99 · 1 comment ·
All issues in HaxeFoundation/format
Similar issues
-
eegprep-lean: set channel types from the Zarr group's channel_typePossibly taken @claude claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
sccn/eegprep#668 · 1 comment ·
Maintainers usually reply within 1 day
-
bug discord triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
v1
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Affine transformations of `JohnsonSU` could return a `JohnsonSU`Possibly taken @devmotion claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaStats/Distributions.jl#2117 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100