Re: Need help with multibyte UTF-8 characters

2017-12-12 Thread Thomas Taylor
I believe that Cygwin displays certain UTF-8 characters incorrectly.  To 
see the problem, first save the attached "utf-8_test.sed" text file to 
your desktop.  Then run "mintty," and set its options by right clicking 
in its title bar, selecting "Options" and then "Text."  On the Text page 
set "Locale" to "en_US" and "Character set" to "UTF-8," and then 
"Save."  Now exit and restart mintty.  Change directory to your desktop 
and run the editor "vim" on the utf-8_test.sed file.  Once inside vim do 
a ":set fileencoding=utf-8".  You should now see that vim displays 
correctly a sample of one-, two-, and three-byte UTF-8 character 
encodings in the test file.  Vim fails, however, on the three-byte 
encodings for the "en" dash, the "em" dash, and the ellipsis, each of 
which displays incorrectly as a filled-in rectangle.  Now exit vim and 
do a "less" or "cat" on the utf-8_test.sed file.  You should see most of 
the sample UTF-8 encoded characters displayed correctly, except once 
again for the en dash, em dash, and ellipsis.  So it looks like a 
problem in the underlying Cygwin run-time libraries rather than in vim, 
less, or cat.  I haven't tested this on four-byte UTF-8 character 
encodings, but assume Cygwin will have similar problems.


# This is file "utf-8_test.sed"
#
# It's used by the "sed" utility program
# to convert XML-encoded filenames to UTF-8

# Match longest strings first

# Three-byte encodings:

# En dash
s/%[Ee]2%80%93/–/g

# Em dash
s/%[Ee]2%80%94/—/g

# Horizontal ellipsis
s/%[Ee]2%80%[Aa]6/…/g

# Less-than-or-equal sign
s/%[Ee]2%89%[Aa]4/≤/g

# Euro symbol
s/%[Ee]2%82%[Aa][Cc]/€/g

# Two-byte encodings:

# Non-break space
s/%[Cc]2%[Aa]0/⎵/g

# Lowercase a with acute accent
s/%[Cc]3%[Aa]1/á/g

# Lowercase a with umlaut (a.k.a. diaeresis)
s/%[Cc]3%[Aa]4/ä/g

# Lowercase e with acute accent
s/%[Cc]3%[Aa]9/é/g

# Lowercase i with acute accent
s/%[Cc]3%[Aa]D/í/g

# Lowercase o with acute accent
s/%[Cc]3%[Bb]3/ó/g

# Lowercase n with tilde
s/%[Cc]3%[Bb]1/ñ/g

# Lowercase c with acute accent 
s/%[Cc]4%87/ć/g

# Lowercase o with long accent (a.k.a. macron)
s/%[Cc]5%8[Dd]/ō/g

# One-byte encodings:

# "And" sign (a.k.a. ampersand)
s/&/\&/g

# Space
s/%20/ /g

# Sharp (or pound) sign
s/%23/#/g

# Percent sign
s/%25/%/g

# Left square bracket
s/%5[Bb]/[/g

# Right square bracket
s/%5[Dd]/]/g

# End of file "utf-8_test.sed"


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple

Re: Need help with multibyte UTF-8 characters

2017-12-11 Thread Thomas Taylor
Thank you for your advice on setting my locale to en_US.UTF-8.  
Unfortunately, Cygwin still seems to have trouble displaying some 
three-byte UTF-8 encoded characters correctly.  For example, see the 
following snippet from a "sed" file.  This file attempts to convert 
XML-encoded filenames to UTF-8.  As you can see, it converts one- and 
two-byte encodings correctly, but fails on some three-byte encodings 
(the en dash, the em dash, and the ellipsis, all of which are displayed 
as a filled-in rectangle):


# Match longest strings first

# Three-byte encodings:

# En dash
s/%[Ee]2%80%93/–/g

# Em dash
s/%[Ee]2%80%94/—/g

# Horizontal ellipsis
s/%[Ee]2%80%[Aa]6/…/g

# Less-than-or-equal sign
s/%[Ee]2%89%[Aa]4/≤/g

# Euro symbol
s/%[Ee]2%82%[Aa][Cc]/€/g

# Two-byte encodings:

# Non-break space
#s/%[Cc]2%[Aa]0/⎵/g

# Lowercase a with acute accent
s/%[Cc]3%[Aa]1/á/g

# Lowercase a with umlaut (a.k.a. diaeresis)
s/%[Cc]3%[Aa]4/ä/g

# Lowercase e with acute accent
s/%[Cc]3%[Aa]9/é/g

# Lowercase i with acute accent
s/%[Cc]3%[Aa]D/í/g

# Lowercase o with acute accent
s/%[Cc]3%[Bb]3/ó/g



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



How do I reply to a post ?

2017-12-05 Thread Thomas Taylor
How do I reply to a post so that all previous replies are included, and 
are nested to the appropriate depth?  I'm using Thunderbird 52.5.0 
(32-bit) on Windows 7. Thanks!



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Need help with multibyte UTF-8 characters

2017-12-04 Thread Thomas Taylor
I want to use multibyte UTF-8 characters in 64-bit Cygwin under Windows 
7.  The "vim" editor running in mintty displays the two-byte characters 
correctly, but not the three- (and I assume four-) byte characters, 
which instead display as rectangular filled-in blocks.  The "less" 
program doesn't even display two-byte characters correctly, but instead 
displays them as  to , depending on the character in question, 
in reverse color in the terminal window.  The "cat" program is even 
worse, replacing every two-byte character with a character that looks 
like three horizontal bars stacked one above the other.  I've read the 
"Internationalization" page in the Cygwin online manual, but am still 
baffled.  My LANG environment variable is set to "en_US.UTF-8".  Can 
anyone help?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



What would it take to get Cygwin and NTFS file permissions to play nice?

2016-08-12 Thread Thomas Taylor
I use rsync to back up my Cygwin user directories to an external USB 
disk drive, formatted as NTFS.  This fails from time to time, usually 
due to permission failures when trying to update the destination files. 
The Windows permissions of the destination files turn out to be in the 
wrong order, and to contain extraneous entries.  Further checking of 
other files on the destination drive reveal the same problem with their 
Windows permissions.  Rather that try to correct the Windows permissions 
of each file in turn, I go as far up the directory tree as needed, and 
recursively reset all Windows file permissions all the way down.  When I 
then rsync the USB drive back to my user directories, the UNIX 
permissions of every file are now set to executable.  This has the 
unfortunate effect of granting execute permission on every file 
restored, even those that are not executable.  I gave up on correcting 
the permissions of the restored files (via a long-running recursive 
script), and learned to live with the problem.  Until now, that is.  I 
thought I'd try "ls --color", and was disappointed to find that almost 
everything (except directories and symbolic links) came out light green. 
 This happened because almost everything was marked as executable, and 
this happened because rsync mangled the Windows permissions, which are 
most easily reset to be the same on all files in a given directory and 
all subdirectories.  These Windows permissions inevitably involve "Full 
Control" (including execute permission) for somebody, especially the 
owner.  Yeah, I've read the Cygwin doc on this, and I get the feeling 
that solving it is too difficult/impossible/not worth the effort.  For 
starters, could we at least set the Windows permissions in proper order?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Please explain how to add to a thread in this mailing list

2016-08-12 Thread Thomas Taylor
I'd like to thank all of you who responded with advice on how to use 
this mailing list, and how to reply to a post.  I'd especially like to 
thank Kaz Kylheku for his extensive and detailed tutorial on how to use 
the mailing list, written as a reply to my original post.  I encourage 
everyone to take a look at it.


Eliot Moss suggested I sign up for the list, as I had just gone ahead 
and posted what I think is a bug ("tcsh version 6.19.00-3 hangs on 
exit") without realizing I should first sign up.  I then subscribed to 
the list in digest form, but it's difficult to use (emails come as 
individual numbered attachments, which must be cross-referenced to the 
digest itself), and doesn't lend itself to back-and-forth use.  Greg 
Freemyer suggested that I instead subscribe such that I get each post as 
a separate email.


Jack (no last name) and Kaz both emphasized the importance of the 
"References" field in the message header.  I noticed the References 
field in the posts that were replies to my original post, but had no 
idea of how to incorporate this field into my replies to the replies. 
As I had not yet subscribed to the list, I had no emails to reply to. 
If I understand correctly, such emails would have included the essential 
References field in their message headers.  As I had not yet subscribed, 
I had no emails to reply to, and thus posted my replies (like this one) 
as top-level posts.


And Kaz, I should have been cutting and pasting quoted text from the 
archive, but unfortunately I wasn't.  That's why none of my replies 
(really completely new messages) quote the original message when replying.


Everybody, please correct me if I've gotten anything wrong.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Please explain how to add to a thread in this mailing list

2016-08-11 Thread Thomas Taylor
Thank you for responding to my post.  I think I asked the wrong 
question.  What I really want to know is how to use this mailing list 
and others like it.  I'm new at this, and can't find any instructions 
anywhere.  Such lists must have become part of the culture, and I must 
have missed school that day.  I'm able to create a post, but don't know 
how to reply to one.  Somehow I got the feeling that I should only reply 
to the mailing list, rather than directly to the person (like you) who 
responded to my post.  I don't get responses via email, and don't even 
know if I should.  Instead, I check for them periodically on the web 
page for the mailing list archive.  If I find a response, I don't know 
the right way to reply.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Please explain how to add to a thread in this mailing list

2016-08-11 Thread Thomas Taylor
I tried to reply to the person who replied to my original post.  I did 
this by sending an email to this mailing list, with "RE: subject line>" as the new subject line.  The mailing list took this to 
be a reply to my original post, rather than a reply to the person who 
replied to my original post.  Should I have used "RE: RE: subject line" instead?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: tcsh version 6.19.00-3 hangs on exit

2016-08-11 Thread Thomas Taylor
I really appreciate your looking into this problem.  I use the Cygwin64 
Terminal icon to create one or more windows.  I set my login shell to 
/bin/tcsh in /etc/passwd.  As you suggested, I deleted ~/.logout, and do 
not have an /etc/csh.logout.  I also deleted ~/.login, and reduced my 
(optional) ~/.cshrc to only the following two lines:


set history=100
set savehist=($history merge lock)

In this case (if I understand correctly) tcsh first sources 
/etc/csh.cshrc, then ~/.cshrc, then /etc/csh.login.  The files 
/etc/csh.cshrc and /etc/csh.login are as downloaded from one of the 
Cygwin x86_64 mirror sites, and are unchanged by me; only the optional 
file ~/.cshrc (above) has been added by me.  Unfortunately, all mintty 
windows hang upon exit, and each must be killed (along with its 
associated tcsh) using the Windows Task Manager.  C-Shell scripts 
started from the command line also hang upon exit (unless their first 
line contains the fast startup flag "-f"), and must be killed with 
Control-C.  The mintty windows and the C-Shell scripts do not hang if 
the third word "lock" is removed from the setting of savehist in 
~/.cshrc.  I would like to use "lock" for the reasons mentioned in the 
tcsh man pages.  Things seemed to work fine until a couple of weeks ago, 
when I updated my Cygwin system.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



tcsh version 6.19.00-3 hangs on exit

2016-08-07 Thread Thomas Taylor
tcsh version 6.19.00-3 hangs on exit.  tcsh scripts, once OK, no longer 
respond to Control-C; must be stopped with Control-Z and then killed.  
To test, try simplest possible script:  #!/bin/csh as first and only 
line.  (Simplest possible bash script works fine.)  Am running tcsh 
version 6.19.00-3; mintty version 2.4.4; Cygwin version 2.5.2-1 64-bit; 
Windows 7 SP 1 64-bit.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple