Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iceberg and UTF-8 #5739

Closed
David5i6 opened this issue Feb 22, 2020 · 3 comments
Closed

Iceberg and UTF-8 #5739

David5i6 opened this issue Feb 22, 2020 · 3 comments

Comments

@David5i6
Copy link
Contributor

When doing a commit Iceberg asked for name and email.After writing my name "David Sánchez Gregori" I get an error reading UTF-8, in the debug I saw that a Stream contain the name but in latin1 instead than in UTF-8.

I changed IceLibgitRepository#commitFromGitRepository to:

"protocol: #'private-commits'"

commitFromGitCommit: aLGitCommit 
	
	^ self commitCache at: aLGitCommit id hexString ifAbsentPut: [ 
		IceGitCommit new
			id: aLGitCommit id hexString;
			author: aLGitCommit author name asByteArray asString  ;
			datetime: aLGitCommit time asDateAndTime;
			ancestorIds: (aLGitCommit parents collect: [ :parent | parent id hexString ]);
			comment: aLGitCommit message;
			repository: self;
			yourself ]

The change is in "author: aLGitCommit author name asByteArray asString ;".

After this change it worked for me but I'm not sure if it will work for UTF-8 saved streams.

Perhaps decoding UTF-8 and in case of error defaultin to "asString" ?
Perhaps it should ensure when the user name and email are stored that they're stored as UTF-8 streams and not in other encodings ?

@Ducasse
Copy link
Member

Ducasse commented Feb 23, 2020

We should open an issue in the iceberg project http://github.com/pharo-vcs/iceberg

@David5i6
Copy link
Contributor Author

Put the issue in Iceberg project.
#1346

@Ducasse
Copy link
Member

Ducasse commented Feb 23, 2020

super tx!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants