Opened 11 years ago
Closed 9 years ago
#815 closed enhancement (fixed)
Replace non-ASCII curly single quotes in mediagoblin.ini with straight single quotes
Reported by: | ayleph | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | |
Component: | documentation | Keywords: | mediagoblin.ini, quotes, ASCII |
Cc: | berkerpeksag | Parent Tickets: |
Description
I just pulled down mediagoblin from git onto a new box and noticed that mediagoblin.ini has a couple of non-ASCII curly quotes in the comments. In fresh-out-of-the-box vim, it looks like:
# It defines types and defaults so it�~@~Ys a good place to look for documentation
# or to find hidden options that we didn�~@~Yt tell you about. :)
Diff below.
--- mediagoblin.ini 2013-11-18 03:05:50.219990987 -0500
+++ mediagoblin-straightquotes.ini 2013-11-18 03:19:49.106257393 -0500
@@ -2,8 +2,8 @@
# mediagoblin_local.ini, then make the changes there.
#
# If you don't see what you need here, have a look at mediagoblin/config_spec.ini
-# It defines types and defaults so it’s a good place to look for documentation
-# or to find hidden options that we didn’t tell you about. :)
+# It defines types and defaults so it's a good place to look for documentation
+# or to find hidden options that we didn't tell you about. :)
Attachments (1)
Change History (5)
comment:1 by , 9 years ago
Status: | new → review |
---|
by , 9 years ago
Attachment: | issue_815.patch added |
---|
comment:2 by , 9 years ago
Ayleph, to be more specific, the LANG
environment variable is what affects Vim assumes is the default character encoding. For example, you'll see weird characters if you run:
LANG=en_US.iso88591 vim mediagoblin.example.ini
or:
LANG=en_US.ascii vim mediagoblin.example.ini
but it shuld look fine if you run:
LANG=en_US.utf-8 vim mediagoblin.example.ini
Aside from the fact that the patch will resolve the issue for you anyway, you might want to change your default encoding.
comment:3 by , 9 years ago
Cc: | added |
---|
Hey Sturm, thanks for the locale tip. As you probably guessed, the account I used for this has LANG=C
. I do like keeping this consistent though. The patch looks good to me. CC'ing berker for review and inclusion in master.
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | review → closed |
I've added a patch to change the two curly quotes to straight quotes. I don't necessarily think that there's anything wrong with using non-ASCII characters, since UTF-8 is now the de facto standard file encoding, but in this case, we might as well be consistent with the other straight quotes.
Thanks for reporting this Ayleph. The behaviour you're seeing is related to the default encoding for your system, not necessarily Vim itself. If you run
locale
, you will get a list of the relevant environment variables. You'll probably see some listing "ASCII" or similar. The reason curly quotes aren't a problem for me are than my locale is set to "UTF-8". If you're on a Debian-based system, you can runsudo dpkg-reconfigure locales
which will let you choose a new default system locale.