Opened 15 years ago

Last modified 15 years ago

#1393 closed enhancement

The "Edit file" function should check the size after loading/before saving — at Version 3

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 2.13.1
Component: web Version:
Keywords: Cc:

Description (last modified by Nicklas Nordborg)

The "Edit file" function is useful for editing text files below 100kb in size. There have been reports that part of the file content is lost during the editing. We have been unable to reproduce this loss, but we should add checks in the code to make sure that:

  1. The complete file is received by the edit window
  2. The complete content of the edit window is sent back to the server

For more information set the mailing list discussion: http://www.mail-archive.com/basedb-users@lists.sourceforge.net/msg01823.html

Change History (3)

comment:1 by Nicklas Nordborg, 15 years ago

Hmmm... I just realized that checking the number of bytes received/sent by the server is not going to help since this doesn't have to be the same number as the number of characters in the form. It all depends on the character set used by the file.

Hmmm... could this be what is causing the problems? I have made my tests with an ISO-8859-1 file.

comment:2 by Nicklas Nordborg, 15 years ago

Tested with an UTF-8 encoded file and there is no problem with it either.

The above statement about checking sizes only applies when loading the file. When saving the file we are working with character-based streams which means that we should be able to compare the character count on the server with the character count in the web client.

comment:3 by Nicklas Nordborg, 15 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.