Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] I miss ..., bug in to-local-file ...

From: petr::krenzelok::trz::cz at: 8-Jun-2001 13:22

Hi, 1) today I worked on some short virus user log analysing script producing .html file output, and while I was able to use Czech langueage characters, I have two following observations: a) Special characters are not correctly sorted, e.g. S^ is not following S , but is placed right after "Z" ... not sure if it is currently solvable ... b) we have system/locale settings, but even to-idate ignores them: ->> source to-idate to-idate: func [ "Returns a standard Internet date string." date [date!] /local str ][ str: form date/zone remove find str ":" if (first str) <> #"-" [insert str #"+"] if (length? str) <= 4 [insert next str #"0"] head insert str reform [ pick ["Mon," "Tue," "Wed," "Thu," "Fri," "Sat," "Sun,"] date/weekday date/day pick [ "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" Nov "Dec" ] date/month date/year date/time "" ] ] I would like to suggest adding to-local-date mezzanine, to return local date setting, if possible ... currently I am just using my own solution: system/locale/months: ["Leden" "Únor" "Březen" "Duben" "Květen" "Červen" Červenec "Srpen" "Září" "Říjen" "Listopad" "Prosinec"] system/locale/days: ["Pondělí" "Úterý" "Středa" "Čtvrtek" "Pátek" Sobota "Neděle"] months: [ Jan "01" Feb "02" Mar "03" Apr "04" May "05" Jun "06" Jul "07" Aug "08" Sep "09" Oct "10" Nov "11" Dec "12" ] to-local-date: func [rebdate][ tmp: parse to-string rebdate "-" return join "" [either (to-integer first tmp) < 10 [join "0" first tmp][first tmp] "." select months second tmp "." third tmp] ] ... but, isn't there any general solution to the problem? (maybe native function getting OS locale setting?) 2) ->> join to-local-file %/C/Work/ "ble.txt" == %C:\Workble.txt Cheers, -pekr-