Comments (7)
Could you attach the diff in an email to [email protected].
Does the original version of the script before the recent awk change work any better?
https://raw.githubusercontent.com/pixelb/scripts/bd2aabd/scripts/ansi2html.sh
from scripts.
Good question. The reason I came here to get the newest version is that I was using the older version, and thought I'd try the new one. So...
Nope, it also dies with this character.
I'll attach the diff --color (which is a .txt file) to an email to you, as well as the output html that is cut short.
from scripts.
Seems locale related. I can get new or old script to misbehave when I give it your UTF8 input, but with the locale variables not set. Though I can't get output truncated like you do. I presume there is an error message on stderr when this truncation happens? Are you running the script with a weird environment? If not what is the output from the command: locale
from scripts.
I'm just running it on qa linux box, I don't >>think<< that anything is weird about it.
jschlick@dvm-jschlick2:/usr/local/html(BGS-1516)$ locale
LANG=en_US
LANGUAGE=
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=
(I've never used this command before, so I just blindly typed it, and this is the output.)
from scripts.
You're in an is0-8859-1 locale. It's unusual to not be in a UTF8 locale these days.
A probable workaround would be to set a UTF8 locale first like:
git diff | (export LC_ALL=en_US.utf8; ansi2html.sh) > blah.html
I'll work on making it more locale agnostic
from scripts.
Your workaround works for this case.
thanks for figuring it out, I'd have probably never gotten there (since I don't actually know what that export does...)
If you do make this more locale agnostic, please let me know, and I'll happily take the new version and apply it to the entire company here.
from scripts.
The latest version is now more locale agnostic. Could you try it out? I've not marked this bug as fixed though as I wasn't able to recreate your output truncation issue
from scripts.
Related Issues (16)
- [PATCH] ps_mem.py: Ennobling the -s switch HOT 2
- [gcccpuopt] AMD Athlon XP Called Athlon-4 under Arch Linux HOT 1
- ansi2html should use gawk HOT 4
- ansi2html.sh bugs completely if locale is not utf8 HOT 1
- ps_mem on Linux 3.0 HOT 1
- How to force wrapping of lines in ansi2html.sh output? HOT 1
- gawk: cmd. line:25: (FILENAME=- FNR=1) fatal: attempt to use array `a (from span)' in a scalar context when trying to convert colored bash text HOT 5
- l script: regex messes up regex for .hushlogin in LS_COLORS
- Colours Not Correct HOT 2
- Cannot convert files from ANSI-art galleries HOT 5
- ansi2html.sh: CLI Option to enable and disable word wrap
- Error in V2.5 HOT 1
- License? HOT 7
- ps_mem.py proc global variable HOT 1
- ps_mem.py feature request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scripts.