I'm thinking that IsAmbiguous(r rune) is also needed. On 2012/11/26 06:22:17, mattn wrote: > Hello ...
11 years, 5 months ago
(2012-11-26 06:24:19 UTC)
#2
I'm thinking that IsAmbiguous(r rune) is also needed.
On 2012/11/26 06:22:17, mattn wrote:
> Hello mailto:golang-dev@googlegroups.com (cc:
mailto:golang-dev@googlegroups.com),
>
> I'd like you to review this change to
> http://go.googlecode.com/hg/
Hello, Can you explain the rationale for the change? - is it for use by ...
11 years, 5 months ago
(2012-11-26 07:30:36 UTC)
#4
Hello,
Can you explain the rationale for the change?
- is it for use by text/tabwriter?
- can you give a reference in the Unicode Standard for the cell count
of characters and add it as a comment to your function?
- I expect many characters to have zero-width, where are they?
- is there already an external package we can use to try the functionality?
Rémy.
Hi > Can you explain the rationale for the change? > - is it for ...
11 years, 5 months ago
(2012-11-26 07:53:42 UTC)
#5
Hi
> Can you explain the rationale for the change?
> - is it for use by text/tabwriter?
There is alredy the text exitor written in go.
https://github.com/nsf/godit
This is working good with ascii characters on terminal.
Currently, godit don't work with multi-byte characters.
> - can you give a reference in the Unicode Standard for the cell count
> of characters and add it as a comment to your function?
Not unicode standard, but is in ieee, i guess.
http://pubs.opengroup.org/onlinepubs/009695399/functions/wcwidth.html
> - I expect many characters to have zero-width, where are they?
ok, If golang-dev team allow to add this CL into pkg directory, I'll update.
Thanks for your point.
> - is there already an external package we can use to try the functionality?
I don't know.
Thanks.
- mattn
If you want to wrap the long lines by specified column width, this function many ...
11 years, 5 months ago
(2012-11-26 08:13:48 UTC)
#6
If you want to wrap the long lines by specified column width, this function many
be useful.
For example, generate static html which is wrapped by 80 characters width on
server side.
On 2012/11/26 07:53:42, mattn wrote:
> Hi
>
> > Can you explain the rationale for the change?
> > - is it for use by text/tabwriter?
>
> There is alredy the text exitor written in go.
>
> https://github.com/nsf/godit
>
> This is working good with ascii characters on terminal.
> Currently, godit don't work with multi-byte characters.
>
> > - can you give a reference in the Unicode Standard for the cell count
> > of characters and add it as a comment to your function?
>
> Not unicode standard, but is in ieee, i guess.
>
> http://pubs.opengroup.org/onlinepubs/009695399/functions/wcwidth.html
>
> > - I expect many characters to have zero-width, where are they?
>
> ok, If golang-dev team allow to add this CL into pkg directory, I'll update.
> Thanks for your point.
>
> > - is there already an external package we can use to try the functionality?
>
> I don't know.
>
> Thanks.
> - mattn
I think this function is better put in package unicode instead of unicode/utf8 (it has ...
11 years, 5 months ago
(2012-11-26 12:40:21 UTC)
#7
I think this function is better put in package unicode instead
of unicode/utf8 (it has nothing to do with utf8).
A possible Unicode reference for this:
http://www.unicode.org/reports/tr11/
I'd like to postpone this CL until after Go 1.1 is out. If this belongs ...
11 years, 5 months ago
(2012-11-26 16:13:22 UTC)
#8
I'd like to postpone this CL until after Go 1.1 is out. If this
belongs anywhere, it belongs in package unicode, but it should be
generated from the Unicode tables, and it should probably be part of a
larger discussion about Unicode property values (East_Asian_Width is
just one such property). I don't believe we're in a position to have
that discussion just yet. I'd like to see normalization finished and
baked for a while. I realize we're moving slowly on good Unicode
support, but let's take our time and do it right.
I do see that POSIX defines a wcwidth, but most of POSIX's decisions
about how to handle "wide characters" were not well thought out. The
fact that the name wcwidth refers to two distinct meanings of wide is
a case in point.
Russ
I'm not exactly sure what this is, but I think it has to do with ...
10 years, 11 months ago
(2013-06-03 12:26:43 UTC)
#11
I'm not exactly sure what this is, but I think it has to do with width of a rune
relative to an ASCII letter on a fixed-pitch screen.
Such display-oriented stuff has nothing to do with UTF-8 and arguably very
little to do with Unicode. It doesn't belong in this repository. It might make
sense in the go.text repo, but even there I'd need some convincing.
Independent point: Although I understand (if I'm correct) what the motivation
is, fixed-width screens are going the way of dinosaurs and github denizens. I do
not want to encourage such a backwards-looking approach to the design of user
interfaces.
Issue 6782117: code review 6782117: unicode/utf8: add Width() to work as wcwidth(). return ...
Created 11 years, 5 months ago by mattn
Modified 10 years, 9 months ago
Reviewers: golang-dev, minux1, rsc, r, bradfitz
Base URL:
Comments: 0