#foswiki 2017-04-13,Thu

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
***Vampire0 has quit IRC (Ping timeout: 260 seconds) [01:55]
.............. (idle for 1h9mn)
GithubBot[NotificationPlugin] gac410 pushed 1 new commit to master: https://git.io/vSy9l
NotificationPlugin/master 31fc8bd George Clark: Item11574: Finish modernization of plugin...
[03:04]
***GithubBot has left [03:04]
FoswikiBothttps://foswiki.org/Tasks/Item11574 [ Item11574: Plugin buttons not working ] [03:04]
............................................ (idle for 3h35mn)
***ChanServ sets mode: +o cdot [06:39]
........ (idle for 38mn)
ChanServ sets mode: +o cdot [07:17]
............................. (idle for 2h20mn)
ChanServ sets mode: +o cdot [09:37]
.... (idle for 15mn)
colas has quit IRC (Remote host closed the connection) [09:52]
.... (idle for 16mn)
AlHarnHi there, https://foswiki.org/Support/Question1865 your help is highly appreciated [10:08]
cdotAlHarn: DatabasePlugin? Or DBIQueryPlugin?
What Foswiki version?
[10:19]
AlHarnDatabasePlugin and Foswiki 2.1.3. Same Problem with Foswiki 2.0 though [10:21]
cdotgood grief, another one. I didn't even realise DatabasePlugin existed; alongside DBIQueryPlugin, DatabaseContrib, SqlPlugin....
my guess is that DatabasePlugin was written without taking unicode into account. Often the case with plugins written by Americans.
just checked; DBD::Pg works fine when it is passed unicode strings, the driver handles conversion to/from UTF8 transparently. Two obvious questions; what encoding did you create the DB with, and what is your {Store}{Encoding}?
[10:23]
AlHarnThe Store Encoding is supposed to be UTF-8 but I converted from Windows-1252. The database itself is sadly not unicode... But shouldn't the specific example still work since the unicode character only gets concatenated to the result [10:36]
cdotI don't know the internals of DatabasePlugin, how it handles that concatenation. But the failure is in DBD::Pg, suggesting it's the query (or result therefrom) that is at fault. [10:37]
AlHarnSo the easiest fix for that specific example would probably be to just add the € signs outisde of the SQL statement or something similar. The problem is I'll need to check a lot of other topics manually for similar error but there seesms to be no way around it [10:39]
cdotI can't tell from your support query what you are doing in the topic. DatabasePlugin seems to have a bunch of syntax that isn't evident from that topic. If you show me the actual statements you are using, I might be able to advise. [10:43]
AlHarnThe exact query is:
%DATABASE_SQL_TABLE{description="prm" command="SELECT to_char(hochrechnung_umsatz, '999G999') || '€',CASE WHEN to_char(CURRENT_DATE, 'DD')='01' OR to_char(CURRENT_DATE, 'MMYYYY')<>'%CALC{$GET(Monat)}%%CALC{$GET(Jahr)}%' THEN ' ------' ELSE to_char(hochrechnung_umsatz-(SELECT hochrechnung_umsatz FROM hochrechnung_monatsumsatz WHERE datum=h.datum-1), '999G999') || '€' END AS aenderung, to_char(hochrechnung_umsatz_ohne_Auftrag, '999G
_umsatz_folgemonat, '999G999') || '€','<div style=\"background-color:#FFAAAA;text-align:right\" ><b>' || to_char(hochrechnung_teilumsatz_monatswechsel, '999G999') || '€' || '</b></div>' FROM hochrechnung_monatsumsatz h WHERE to_char(datum, 'MMYYYY')='%CALC{$GET(Monat)}%%CALC{$GET(Jahr)}%' AND hochrechnung_umsatz>1 ORDER BY datum DESC LIMIT 1" headers="&nbsp;Prognose&nbsp;,&nbsp;Änderung&nbsp;, &nbsp;Noch nicht beauftragt&nbsp;, &n
;Teilumsatz über Monatswechsel&nbsp;"}%
[10:53]
..... (idle for 20mn)
cdotThat's a puzzle. You are passing a unicode string to $dbh->prepare, and that's what is failing. You really need to narrow down to the smallest %DATABASE statement that exhibits the problem (to eliminate the embedded CALC etc)
FWIW there's no problem passing unicde strings to $dbh->prepare, I do it all the time. There's some other manipulation being done to the string, probably in the DatabasePlugin.
[11:16]
AlHarnOK thanks I'll look into it in more detail, but I already know that replacing the € signs with some ASCII characters does work without errors. [11:21]
cdotIt would do. The error is because of the unicode euro symbol. It would probably work fine if you passed '&euro;' as well.
y, without knowing more about your application I'd guess the best approach is to replace '€' with '&euro;' throughout your macros.
[11:24]
AlHarnI had that idea too and tried it out by replacing € with &euro; using SED in my import script and it worked fine. Except for the fact hat when opening the topic in the foswiki webeditor and saving, even without changing anything, the &euro; get replaced by € signs again and the problem is back. So it is not a solution since people here use the webeditor
I am not sure if thats an browser issue or because of the webidtor itself
[11:33]
............. (idle for 1h4mn)
***ChanServ sets mode: +o Lynnwood [12:39]
ChanServ sets mode: +o Lynnwood__
ChanServ sets mode: +o Lynnwood
[12:45]
ChanServ sets mode: +o gac410 [12:57]
........................... (idle for 2h13mn)
FoswikiBot has quit IRC (*.net *.split) [15:10]
....... (idle for 30mn)
tuor__ has quit IRC (Quit: WeeChat 1.5) [15:40]
...... (idle for 28mn)
gac410 sets mode: +v [LOGGER_FOSWIKI]
gac410 sets mode: +v FoswikiBot
[16:08]
..... (idle for 21mn)
ChanServ sets mode: +o cdot [16:29]
......................... (idle for 2h4mn)
unixdork has quit IRC (Quit: EliteBNC free bnc service - http://elitebnc.org/) [18:33]
...................... (idle for 1h47mn)
ChanServ sets mode: +o cdot [20:20]
SvenDowideit has quit IRC ()
ChanServ sets mode: +o SvenDowideit
[20:25]
....... (idle for 34mn)
ChanServ sets mode: +o cdot [20:59]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)