-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9dc639
commit 9b627b0
Showing
7 changed files
with
48 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Changelog for encodingTest | ||
# Changelog for utf8Guard | ||
|
||
## Unreleased changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
# encodingTest | ||
# utf8Guard | ||
|
||
## Execute | ||
Ever had a file that should contain only valid utf8 characters, but for some reason invalid unicode codepoints are in? | ||
This little tool comes to the rescue. It substitues all those invalid stuff with a valid dummy character. | ||
|
||
* Run `stack exec -- encodingTest-exe` to see "We're inside the application!" | ||
* With `stack exec -- encodingTest-exe --verbose` you will see the same message, with more logging. | ||
|
||
## Run tests | ||
|
||
`stack test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: encodingTest | ||
name: utf8Guard | ||
version: 0.1.0.0 | ||
github: hanjoosten/encodingTest | ||
github: hanjoosten/utf8Guard | ||
license: BSD3 | ||
author: Han Joosten | ||
maintainer: [email protected] | ||
|
@@ -11,13 +11,13 @@ extra-source-files: | |
- ChangeLog.md | ||
|
||
# Metadata used when publishing your package | ||
# synopsis: Short description of your package | ||
# category: Web | ||
synopsis: Substitute invalid utf8 characters with a valid one. | ||
category: tools | ||
|
||
# To avoid duplicated efforts in documentation and dealing with the | ||
# complications of embedding Haddock markup inside cabal files, it is | ||
# common to point users to the README.md file. | ||
description: Please see the README on Github at <https://github.com/hanjoosten/encodingTest#readme> | ||
description: Please see the README on Github at <https://github.com/hanjoosten/utf8Guard#readme> | ||
|
||
dependencies: | ||
- base >= 4.11 && < 10 | ||
|
@@ -36,11 +36,11 @@ library: | |
source-dirs: src | ||
|
||
executables: | ||
encodingTest-exe: | ||
utf8Guard: | ||
main: Main.hs | ||
source-dirs: app | ||
dependencies: | ||
- encodingTest | ||
- utf8Guard | ||
- optparse-simple | ||
|
||
ghc-options: | ||
|
@@ -49,11 +49,11 @@ executables: | |
- -with-rtsopts=-N | ||
|
||
tests: | ||
encodingTest-test: | ||
utf8Guard-test: | ||
main: Spec.hs | ||
source-dirs: test | ||
dependencies: | ||
- encodingTest | ||
- utf8Guard | ||
- hspec | ||
|
||
ghc-options: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file was autogenerated by Stack. | ||
# You should not edit this file by hand. | ||
# For more information, please see the documentation at: | ||
# https://docs.haskellstack.org/en/stable/lock_files | ||
|
||
packages: [] | ||
snapshots: | ||
- completed: | ||
size: 496112 | ||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/13.yaml | ||
sha256: 75a1a0f870e1876898b117b0e443f911b3fa2985bfabb53158c81ab5765beda5 | ||
original: lts-15.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ cabal-version: 1.12 | |
-- | ||
-- see: https://github.com/sol/hpack | ||
-- | ||
-- hash: e254cc937334827eb1c9e6f050d5ebff4392c688fc48e98d4ba939e3b262fd5f | ||
-- hash: 35ea6b80b972fc51d885abf9878fb59856c5d6f116764b70244c92ab2c376819 | ||
|
||
name: encodingTest | ||
name: utf8Guard | ||
version: 0.1.0.0 | ||
description: Please see the README on Github at <https://github.com/hanjoosten/encodingTest#readme> | ||
homepage: https://github.com/hanjoosten/encodingTest#readme | ||
bug-reports: https://github.com/hanjoosten/encodingTest/issues | ||
description: Please see the README on Github at <https://github.com/hanjoosten/utf8Guard#readme> | ||
homepage: https://github.com/hanjoosten/utf8Guard#readme | ||
bug-reports: https://github.com/hanjoosten/utf8Guard/issues | ||
author: Han Joosten | ||
maintainer: [email protected] | ||
copyright: Han Joosten | ||
|
@@ -23,7 +23,7 @@ extra-source-files: | |
|
||
source-repository head | ||
type: git | ||
location: https://github.com/hanjoosten/encodingTest | ||
location: https://github.com/hanjoosten/utf8Guard | ||
|
||
library | ||
exposed-modules: | ||
|
@@ -32,7 +32,7 @@ library | |
Types | ||
Util | ||
other-modules: | ||
Paths_encodingTest | ||
Paths_utf8Guard | ||
hs-source-dirs: | ||
src | ||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints | ||
|
@@ -41,32 +41,32 @@ library | |
, rio >=0.1.12.0 | ||
default-language: Haskell2010 | ||
|
||
executable encodingTest-exe | ||
executable utf8Guard | ||
main-is: Main.hs | ||
other-modules: | ||
Paths_encodingTest | ||
Paths_utf8Guard | ||
hs-source-dirs: | ||
app | ||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N | ||
build-depends: | ||
base >=4.11 && <10 | ||
, encodingTest | ||
, optparse-simple | ||
, rio >=0.1.12.0 | ||
, utf8Guard | ||
default-language: Haskell2010 | ||
|
||
test-suite encodingTest-test | ||
test-suite utf8Guard-test | ||
type: exitcode-stdio-1.0 | ||
main-is: Spec.hs | ||
other-modules: | ||
UtilSpec | ||
Paths_encodingTest | ||
Paths_utf8Guard | ||
hs-source-dirs: | ||
test | ||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N | ||
build-depends: | ||
base >=4.11 && <10 | ||
, encodingTest | ||
, hspec | ||
, rio >=0.1.12.0 | ||
, utf8Guard | ||
default-language: Haskell2010 |