Skip to content

Commit

Permalink
Support Julia 0.7, drop 0.6 and LegacyStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Jun 17, 2018
1 parent 17d7c89 commit cc7456f
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 143 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ os:
- linux
- osx
julia:
- 0.6
- 0.7
- nightly
notifications:
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# StringEncodings

[![Travis CI Build Status](https://travis-ci.org/nalimilan/StringEncodings.jl.svg?branch=master)](https://travis-ci.org/nalimilan/StringEncodings.jl)
[![Travis CI Build Status](https://travis-ci.org/JuliaStrings/StringEncodings.jl.svg?branch=master)](https://travis-ci.org/JuliaStrings/StringEncodings.jl)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/3gslhfg91isldnvq?svg=true)](https://ci.appveyor.com/project/nalimilan/stringencodings-jl)
[![Coveralls Coverage Status](https://coveralls.io/repos/nalimilan/StringEncodings.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/nalimilan/StringEncodings.jl?branch=master)
[![Codecov Coverage Status](http://codecov.io/github/nalimilan/StringEncodings.jl/coverage.svg?branch=master)](http://codecov.io/github/nalimilan/StringEncodings.jl?branch=master)
[![Coveralls Coverage Status](https://coveralls.io/repos/JuliaStrings/StringEncodings.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/JuliaStrings/StringEncodings.jl?branch=master)
[![Codecov Coverage Status](http://codecov.io/github/JuliaStrings/StringEncodings.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaStrings/StringEncodings.jl?branch=master)

[![Julia 0.6 Status](http://pkg.julialang.org/badges/StringEncodings_0.6.svg)](http://pkg.julialang.org/?pkg=StringEncodings&ver=0.6)
[![Julia 0.7 Status](http://pkg.julialang.org/badges/StringEncodings_0.7.svg)](http://pkg.julialang.org/?pkg=StringEncodings&ver=0.7)

This Julia package provides support for decoding and encoding texts between multiple character encodings. It is currently based on the iconv interface, and supports all major platforms using either the native iconv support or [GNU libiconv](https://www.gnu.org/software/libiconv/). In the future, native Julia support for major encodings will be added.
Expand Down Expand Up @@ -82,12 +81,12 @@ julia> write(f, "café\nnoël")
julia> close(f); # Essential to complete encoding
```

The contents of the file can then be read back using `readstring`:
The contents of the file can then be read back using `read(path, String)`:
```julia
julia> readstring(path) # Standard function expects UTF-8
julia> read(path, String) # Standard function expects UTF-8
"\U3d83f7c0f\0\0n\0o\0\0"

julia> readstring(path, enc"UTF-16") # Works when passing the correct encoding
julia> read(path, String, enc"UTF-16") # Works when passing the correct encoding
"café\nnoël"
```

Expand Down Expand Up @@ -115,7 +114,7 @@ When performing more complex operations on an encoded text file, it will often b
```julia
julia> io = open(path, enc"UTF-16");

julia> readstring(io)
julia> read(io, String)
"café\nnoël"
```

Expand All @@ -142,7 +141,7 @@ julia> seek(b, 0); # Move to start of buffer

julia> s = StringDecoder(b, "UTF-16");

julia> readstring(s) # Decoding happens automatically here
julia> read(s, String) # Decoding happens automatically here
"café"
```

Expand Down
6 changes: 2 additions & 4 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
julia 0.6
BinaryProvider 0.3.0
Compat 0.17.0
LegacyStrings 0.1.1
julia 0.7
BinaryProvider 0.3.0
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
Expand Down
Loading

0 comments on commit cc7456f

Please sign in to comment.