Skip to content

badly encoded character in article name causes sync_ftp_files to abort #23

@JuliusR

Description

@JuliusR

I have experienced a BNN file with a special character in the name of one article. The "bad" article causes the following error:

Mysql2::Error: Incorrect string value: '\xE2\x95\x9Aoro...'
for column `sharedlists`.`articles`.`name` at row 1:
INSERT INTO `articles` (
  `category`, 
  `created_on`, 
  `deposit`, 
  `manufacturer`, 
  `name`, 
  `note`, 
  `number`, 
  `origin`, 
  `price`, 
  `scale_price`, 
  `scale_quantity`, 
  `supplier_id`, 
  `tax`, 
  `unit`, 
  `unit_quantity`, 
  `updated_on`
) VALUES ([...], 'Pomi d╚oro [...]', [...])

The character looks wrong, but I also see that character when opening the original BNN file using CP 850 encoding. I believe it is supposed to read ' or ` or .

The problem is that this one bad file causes the whole sync_ftp_files job to abort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions