Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 17 Sep 2014, 03:37
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
Garbled character?puppy 420 support utf-8?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
sasaqqdan


Joined: 06 Jun 2008
Posts: 39
Location: China,Zhejiang,Hangzhou

PostPosted: Sat 28 Mar 2009, 05:46    Post subject:  Garbled character?puppy 420 support utf-8?  

1. patched init in initrd.gz:
Code:
--- init-en   2009-03-28 06:53:29.000000000 +0800
+++ init-cn   2009-03-28 07:02:36.000000000 +0800
@@ -85,9 +85,7 @@
 }
 
 mntfunc() {
- if [ "`echo "$*" | grep 'ntfs'`" = "" ];then
-  mount $@
- else
+ if [ "`echo "$*" | grep 'ntfs'`" != "" ];then
   #screen out -o and -t options...
   MNTPRMS="`echo -n "$*" | tr '\t' ' ' | tr -s ' ' | tr ' ' '\n' | grep '^/' | tr '\n' ' '`"
   #v4.00 new ntfs-3g version...
@@ -104,6 +102,11 @@
   else
    ntfs-3g $MNTPRMS -o umask=0,no_def_opts,noatime,rw,force 2>/dev/null
   fi
+ elif [ "`echo "$*" | grep 'vfat'`" != "" ];then 
+  MNTPRMS="`echo -n "$*" | tr '\t' ' ' | tr -s ' ' | tr ' ' '\n' | grep '^/' | tr '\n' ' '`" 
+  mount $MNTPRMS -o noatime,utf8,quiet 
+ else
+  mount $@
  fi
  return $?
 }
@@ -1113,7 +1116,7 @@
   #find all the extra sfs files...
   touch /tmp/LOGONEBASES
   NPATTERN="_${PUPPYVERSION}\\.sfs"
-  ls -1 $SFSSDIR/*.sfs |
+  ls -1 $SFSSDIR/*.sfs ${PUPSFSDEVMNTPT}$(dirname $PUPSFSFILE)/*.sfs |
   while read ONEEXTRA
   do
    ONEBASE="`basename $ONEEXTRA`"


2.copy and cover ntfs-3g in initrd.gz

3.modify /usr/local/bin/drive_all:
old 170 line:
Code:
    mount -t vfat -o shortname=mixed,quiet /dev/$ONEDRVNAME /mnt/$ONEDRVNAME #v411

new 170 line:(add utf8)
Code:
    mount -t vfat -o shortname=mixed,quiet,utf8 /dev/$ONEDRVNAME /mnt/$ONEDRVNAME #v411
ruanma.jpg
 Description   Chinese filename is Garbled character
 Filesize   53.53 KB
 Viewed   1389 Time(s)

ruanma.jpg

ntfs-3g-2009.3.8.tar.gz
Description  ntfs-3g 2009.3.8 supported utf-8 in ntfs drive
gz

 Download 
Filename  ntfs-3g-2009.3.8.tar.gz 
Filesize  317.58 KB 
Downloaded  310 Time(s) 
initrd.gz
Description  new initrd.gz supported utf-8 in ntfs or vfat drive
gz

 Download 
Filename  initrd.gz 
Filesize  1.38 MB 
Downloaded  439 Time(s) 

Last edited by sasaqqdan on Sat 28 Mar 2009, 07:35; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sat 28 Mar 2009, 07:09    Post subject:  

When you put text inside the "[code]" brackets, other markup (bold, italic etc.) won't work, since it assumes it's part of the code...
_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sat 28 Mar 2009, 14:48    Post subject:  

Wow, I must be really losing my mind... I was sure you marked the "utf8" in your patch as bold...

Anyway, am I assuming correctly that your change will require nls_utf8 to be loaded in the init script?

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Sat 28 Mar 2009, 14:52    Post subject:  

do you have a chinese font installed?
The square characters indicate, that they are utf8, but that no matching font was found.

look here for chinese fonts:
http://www.murga-linux.com/puppy/viewtopic.php?t=33679

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
sasaqqdan


Joined: 06 Jun 2008
Posts: 39
Location: China,Zhejiang,Hangzhou

PostPosted: Sun 29 Mar 2009, 05:18    Post subject:  

MU wrote:
do you have a chinese font installed?
The square characters indicate, that they are utf8, but that no matching font was found.

look here for chinese fonts:
http://www.murga-linux.com/puppy/viewtopic.php?t=33679

Mark


thanks,but I have used chinese fonts.if pup_420.sfs is in fat or ntfs drive,chinese filename in rox will be Shown as Garbled character!
baidu001.jpg
 Description   
 Filesize   41 KB
 Viewed   1417 Time(s)

baidu001.jpg

Back to top
View user's profile Send private message Visit poster's website 
WhoDo


Joined: 11 Jul 2006
Posts: 4441
Location: Lake Macquarie NSW Australia

PostPosted: Sun 29 Mar 2009, 05:25    Post subject:  

sasaqqdan wrote:
I have used chinese fonts.if pup_420.sfs is in fat or ntfs drive,chinese filename in rox will be Shown as Garbled character!

Install the latest non-prescott version of ntfs-3g from the ibiblio.org repository (Install on the desktop), reboot and try again. Please report your results.

_________________
Actions speak louder than words ... and they usually work when words don't!
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
Back to top
View user's profile Send private message 
sasaqqdan


Joined: 06 Jun 2008
Posts: 39
Location: China,Zhejiang,Hangzhou

PostPosted: Sat 04 Apr 2009, 03:12    Post subject:  

Thanks,WhoDo.
I make ntfs-3g from source code :
Code:
./configure --enable-really-static
make
new2dir make install

The useful ntfs-3g'size is 669kb,not 32k.
Back to top
View user's profile Send private message Visit poster's website 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sat 04 Apr 2009, 06:32    Post subject:  

sasaqqdan wrote:
The useful ntfs-3g'size is 669kb,not 32k.

That's just because you compile it statically against glibc...
Attached is a version compiled statically against uClibc. This is only intended for use in the initrd, obviously.

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Last edited by Dougal on Sun 12 Apr 2009, 05:26; edited 1 time in total
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sun 05 Apr 2009, 06:25    Post subject:  

Dougal wrote:
am I assuming correctly that your change will require nls_utf8 to be loaded in the init script?

Since noone bothered replying to that, I guess I better do it: yes. You need your kernel to have nls_utf8 either built-in or loaded by init, if you want to mount any partitions as utf8.

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0702s ][ Queries: 12 (0.0089s) ][ GZIP on ]