summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/UTF8.hs
Commit message (Collapse)AuthorAge
* Update copyright notices to include 2018Albert Krewinkel2018-01-05
|
* UTF8: export fromText, fromTextLazy.John MacFarlane2017-06-10
|
* UTF8: export toText, toTextLazy.John MacFarlane2017-06-10
| | | | Define toString, toStringLazy in terms of them.
* Add `--eol` flag and writer option to control line endings.Stefan Dresselhaus2017-05-18
| | | | | | | | | | | | * Add `--eol=crlf|lf` CLI option. * Add `optEol` to `WriterOptions` [API change] * In `Text.Pandoc.UTF8`, add new functions parameterized on `Newline`: `writeFileWith`, `putStrWith`, `putStrLnWith`, `hPutStrWith`, `hPutStrLnWith`. [API change] * Document option in MANUAL.txt. Closes #3663. Closes #2097.
* Update dates in copyright noticesAlbert Krewinkel2017-05-13
| | | | | This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
* Stylish-haskell automatic formatting changes.John MacFarlane2017-03-04
|
* Remove unnecessary CPP condition in UTF8Jesse Rosenthal2016-09-02
| | | | Base 4.4 is ghc 7.2, so we don't have to worry about getting a lower version.
* Updated copyright dates to include 2016.John MacFarlane2016-03-22
|
* UTF8: Better handling of bare CRs in input files.John MacFarlane2015-05-05
| | | | | | | Previously we just stripped them out; now we convert other line ending styles to LF line endings. Closes #2132.
* Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|
* Removed unneeded CPP.John MacFarlane2014-08-12
|
* Avoid `import Prelude hiding (catch)`.John MacFarlane2014-05-19
| | | | See #1309.
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* Remove CPP from default-extensions; add pragmas to modules as needed.John MacFarlane2013-08-04
|
* Text.Pandoc.UTF8: Use strict bytestrings in reading.John MacFarlane2013-07-04
| | | | | | | The use of lazy bytestrings seemed to cause problems using pandoc on Windows 7/8 64-bit machines. Closes #874.
* Added CPP directives to avoid warnings.John MacFarlane2013-05-29
| | | | | For 'import Prelude hiding (catch)'. catch is no longer in Prelude starting with base 4.6.
* UTF8: Strip off BOM if present.John MacFarlane2013-02-08
| | | | Closes #743.
* UTF8 module: Remove `\r` when reading.John MacFarlane2013-01-06
| | | | This should prevent problems with extra CRs on windows.
* UTF8: Removed unneeded imports.John MacFarlane2012-09-29
|
* UTF8: Better error message for invalid UTF8.John MacFarlane2012-09-26
| | | | | | | Read bytestring and use Text's decodeUtf8 instead of using System.IO's hGetContents. This way you get a message saying "invalid UTF-8 stream" instead of "invalid byte sequence." You are also told which byte caused the problem.
* Removed need for utf8-string package.John MacFarlane2012-09-25
| | | | | | | | * Depend on text. * Expose Text.Pandoc.UTF8. * Text.Pandoc.UTF8 now exports toString, fromString, toStringLazy, fromStringLazy. * These are used instead of the old utf8-string functions.
* UTF8: use universalNewlineMode in reading.John MacFarlane2012-09-25
| | | | | This treats both '\r\n' and '\n' as '\n' on input, no matter what platform we're running on.
* Revert "More intelligent handling of text encodings."John MacFarlane2012-09-23
| | | | This reverts commit 7272735b3d413a644fd9ab01eeae8ae9cd5a925b.
* More intelligent handling of text encodings.John MacFarlane2012-09-23
| | | | | | | | | | Previously, UTF-8 was enforced for both input and output. The new system: * For input, UTF-8 is tried first; if an error is raised, the locale encoding is tried. * For output, the locale encoding is always used.
* Removed unneeded CPP conditional.John MacFarlane2012-09-23
| | | | | Removed code that was conditional on base < 4.2, since now we require base >= 4.2.
* UTF8: Export decodeArg.John MacFarlane2012-09-23
|
* Export encodePath/decodePath from UTF8.John MacFarlane2012-09-23
| | | | Removed duplicate code in src/pandoc.hs.
* Fixed whitespace errors.John MacFarlane2012-07-26
|
* Test for base 4.4.0 instead of 4.5.0 for argument/filename encoding.John MacFarlane2012-06-25
|
* Don't encode/decode file paths if base >= 4.5.John MacFarlane2012-06-24
| | | | | | | | | | | Prior to base 4.5 (and perhaps earlier - check), filepaths and command line arguments were treated as unencoded lists of bytes, not unicode strings, so we had to work around that by encoding and decoding them. This commit adds CPP checks for base 4.5 that disable the encoding/decoding. Fixes a bug with multilingual filenames when pandoc was compiled with ghc 7.4. Closes #540.
* UTF8: Encode filenames.John MacFarlane2011-02-11
| | | | | | | (This is still needed, even with recent base.) Partially resolves Issue #286 (though now there is a new markdown2pdf problem).
* UTF8: Use #if instead of #ifdef.John MacFarlane2011-01-30
|
* UTF8 module: Use base 4.2 IO if available.John MacFarlane2011-01-30
| | | | | | | | | This gives us proper line endings on windows, and some speed improvements. We fall back to the old functions if base < 4.2. hGetContents is now exported.
* Encode filenames as UTF8.John MacFarlane2010-09-10
| | | | Resolves Issue #252 (pandoc doesn't properly handle unicode filenames).
* Changed to using strict bytestrings in UTF8 module.John MacFarlane2010-07-21
| | | | | This avoids a problem on Windows reading from stdin. Previously we'd get an error from hGetBufNonBlocking.
* UTF8: Modified readFile and getContents to strip BOM if present.John MacFarlane2010-05-06
|
* Added Text.Pandoc.UTF8 for portable UTF8 string IO.John MacFarlane2010-05-06
|
* Moved everything from src into the top-level directory.fiddlosopher2007-11-29
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1104 788f1e2b-df1e-0410-8736-df70ead52e1b
* Reverted back to state as of r1062. The template haskell changesfiddlosopher2007-11-03
| | | | | | | are more trouble than they're worth. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b
* Use template haskell to avoid the need for templates:fiddlosopher2007-11-03
| | | | | | | | | | | | | | | | | | + Added library Text.Pandoc.Include, with a template haskell function $(includeStrFrom fname) to include a file as a string constant at compile time. + This removes the need for the 'templates' directory or Makefile target. These have been removed. + The base source directory has been changed from src to . + A new 'data' directory has been added, containing the ASCIIMathML.js script, writer headers, and S5 files. + The src/wrappers directory has been moved to 'wrappers'. + The Text.Pandoc.ASCIIMathML library is no longer needed, since Text.Pandoc.Writers.HTML can use includeStrFrom to include the ASCIIMathML.js code directly. It has been removed. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1063 788f1e2b-df1e-0410-8736-df70ead52e1b
* Modified fromUTF8 to strip out the BOM (byte order marker)fiddlosopher2007-10-27
| | | | | | | | | wherever it is present. See http://en.wikipedia.org/wiki/Byte_Order_Mark and http://six.pairlist.net/pipermail/markdown-discuss/2007-October/000874.html. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1054 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changed encodeUTF8 to toUTF8, decodeUTF8 to fromUTF8,fiddlosopher2007-07-13
| | | | | | | for clarity. git-svn-id: https://pandoc.googlecode.com/svn/trunk@692 788f1e2b-df1e-0410-8736-df70ead52e1b
* + Added module data for haddock.fiddlosopher2006-12-20
| | | | | | | + Reformatted code consistently. git-svn-id: https://pandoc.googlecode.com/svn/trunk@252 788f1e2b-df1e-0410-8736-df70ead52e1b
* initial importfiddlosopher2006-10-17
git-svn-id: https://pandoc.googlecode.com/svn/trunk@2 788f1e2b-df1e-0410-8736-df70ead52e1b