multi byte filetype problems

0 views
Skip to first unread message

soundphed

unread,
Nov 20, 2008, 10:15:14 AM11/20/08
to vim_use
Hi I have kind of a weird problem I just noticed.

I compiled vim with the +multi_byte option and was able to edit files
just fine, with utf8 as the default encoding, but all of a sudden
everysingle file vim opens it automatically thinks its latin1 and all
the unicode chars go funky and everything. if i ':set filetype=utf8'
everything if fine, but why oh why would it do that to every file it
opens up?? Any ideas? thanks

Tony Mechelynck

unread,
Nov 21, 2008, 2:41:08 AM11/21/08
to vim...@googlegroups.com

You may want to check http://vim.wikia.org/Working_with_Unicode -- and
the help tags mentioned there.

In particular, what is your 'fileencodings' (plural) option set to? It
should start with ucs-bom,utf-8 in that order, and contain at most one
8-bit encoding, which must be last. The reason for that is that since
8-bit encodings cannot give a "fail" signal, anything after the first
8-bit encoding in the list will never be used.

Also, setting 'filetype' to utf8 doesn't sound right to me.
'fileencoding' (singular), maybe, and that using ":setlocal", not
":set". 'filetype' should be vim, c, cpp, html, etc.


Best regards,
Tony.
--
Chipmunks roasting on an open fire
Jack Frost ripping up your nose
Yuletide carolers being thrown in the fire
And folks dressed up like buffaloes
Everybody knows a turkey slaughtered in the snow
Helps to make the season right
Tiny tots with their eyes all gouged out
Will find it hard to see tonight
They know that Santa's on his way
He's loaded lots of guns and bullets on his sleigh
And every mother's child is sure to spy
To see if reindeer really scream when they die
And so I'm offering this simple phrase
To kids from one to ninety two
Although it's been said many times, many ways
Merry Christmas, Merry Christmas, Merry Christmas, Fuck you!!

Reply all
Reply to author
Forward
0 new messages