Skip to content

Commit

Permalink
fix error in ShapeImporter with replace (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
Corgam authored Jul 14, 2024
2 parents 689c8ff + d205796 commit 16e32b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/src/BIE.DataPipeline/DbHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal sealed class DbHelper
private readonly StringBuilder mStringBuilder;

private int mCount;
private const int MaxCount = 900;
private const int MaxCount = 999;


public DbHelper()
Expand Down
5 changes: 3 additions & 2 deletions backend/src/BIE.DataPipeline/Import/ShapeImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ public bool ReadLine(out string nextLine)
var value = mParser.GetValue(i);
mStringBuilder.Append(", '");
var bytes = Encoding.GetEncoding("ISO-8859-1").GetBytes(value?.ToString() ?? "");
mStringBuilder.Append(Encoding.UTF8.GetString(bytes));
mStringBuilder.Append("'");
var str = Encoding.UTF8.GetString(bytes).Replace("'", "_");
mStringBuilder.Append(str);
mStringBuilder.Append('\'');
// nextLine += $", \'{(value != "" ? value : "null")}\'";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"BIE.DataPipeline": {
"commandName": "Project",
"commandLineArgs": "--behavior=replace common/actual_use_Kreisfreie_Stadt_Nuernberg.yaml",
"commandLineArgs": "--behavior=replace common/actual_use_Kreisfreie_Stadt_Erlangen.yaml",
"workingDirectory": "yaml",
"environmentVariables": {
"DB_SERVER": "localhost",
Expand Down

0 comments on commit 16e32b3

Please sign in to comment.