Bug Description
Serbian cyrilic: Опис
is converted to опис
.
select description as "Опис"
from forms f
Serbian latin:
select description as "Šuma"
from forms f
Severity
Expected Behavior
Workarounds There doesn't seem to be workaround
Environment Information
Operating System: Windows 10
Node version (node -v
): 19.1.0
npm version (npm -v
): 8.9.13
Package versions (npm list --depth=0
): `@evidence-dev/[email protected]
Database:
Hi @majkinetor, Confirm this does not happen with other connectors (eg SQLite).
I think the specific piece of code here is this line
@hughess Is there a specific reason we lowercase the keys like this?
@archiewood I actually used the same function for the postgres connector as we already had for the snowflake connector - I believe there was a reason to do that for snowflake but I'm not sure if postgres has the same requirement.
@mcrascal was there a reason for lowercasing the snowflake column names in the standardizeResult
function?
If there's no specific reason for postgres, we should be good to remove that line
2 other ways we can solve this issue:
xAxisTitle
and yAxisTitle
), but doesn't exist yet for tables. It's something we're including in the new tables we're building, so that should be an option to use soon.
<Column id=опис title="Опис"/>
As far as I recall, the Snowflake API returns uppercased column names, regardless of how you write your query. It was quite annoying to need to uppercase everything when referencing columns in components. Just a preference thing -- either we get all uppercase, or all lowercase.
Ok perfect, thanks.
I've just confirmed the behaviour of the postgres db package:
"One"
--> One
)ONE
--> one
)So I think that means we're good to remove the standardizeResult
function for the postgres connector!
It looks like even with the removal of the lowercasing, we'll have an issue with the title formatting function - it's picking up whatever the first A-Z character is and it uppercasing that. We'll need to get it to stop at the first character in the string:
As it turns out, there's an issue in our function for formatting titles. The regex in that function was filtering out the non A-Z characters. With that fixed, we get the following: