Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 63326 Details for
Bug 94836
KDE-i18n-3.4.1: Finnish translations have character encoding bug regarding symbol ä. Patch needed.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
kde.rb
kde.rb (text/plain), 1.61 KB, created by
Petteri Räty (RETIRED)
on 2005-07-13 09:17:59 UTC
(
hide
)
Description:
kde.rb
Filename:
MIME Type:
Creator:
Petteri Räty (RETIRED)
Created:
2005-07-13 09:17:59 UTC
Size:
1.61 KB
patch
obsolete
>#!/usr/bin/ruby > >require 'fileutils' >require 'find' > >$replaceOriginal = false >$replaceOriginal = true if ARGV[0] == "replace" >#puts $replaceOriginal > >TMP_FILE='/tmp/kdefix234.txt' >FIRST = ?[ >PATTERN = FIRST + ?f + ?i + ?] > >def fixFile(toFix) > f = File.new(toFix, 'r') > outFile = File.new(TMP_FILE, 'w') > tomatch = 0 > byte = 0 > corrupted = false > while byte = f.getc > if byte == FIRST > tomatch = byte > outFile.putc byte > > 3.times { > if byte = f.getc > tomatch += byte > outFile.putc byte > end > } > > if tomatch == PATTERN > while (byte = f.getc) != ?\n && byte > #puts byte.chr > #puts byte > if byte == 239 && f.getc == 191 && f.getc == 189 > corrupted = true > #output a with dots > outFile.putc 195 > outFile.putc 164 > else > outFile.putc byte > end > end > outFile.puts > end > else > outFile.putc byte > end > end > > f.close > outFile.close > > if corrupted then > print toFix, ' is corrupted' > if $replaceOriginal > print ' --> fixing' > FileUtils.cp(TMP_FILE, toFix) > end > puts > end >end > >if( ($replaceOriginal && ARGV.length > 1) || > (! $replaceOriginal && ARGV.length > 0)) > puts 'Using filenames given in command line' > ARGV.each { |name| > #name.match(/(desktop)|(directory)$/) && > if FileTest.file?(name) > fixFile(name) > end > } >else > if ! $replaceOriginal > puts 'Searching /usr/kde/3.4 for corrupted files' > else > puts 'Fixing non executable files in /usr/kde/3.4' > end > > Find.find('/usr/kde/3.4/') { |name| > if FileTest.file?(name) && ! FileTest.executable?(name) > fixFile(name) > end > } >end > >File.exist?(TMP_FILE) && FileUtils.rm(TMP_FILE)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 94836
:
63315
| 63326