I'm documenting user-defined functions and their parameters in a database, and what Bi Documenter displays for their documentation (both for the functions as well as the parameters) is a garbled mess of non-standard characters. The documentation is of course in English. When I use fn_listextendedproperty to retrieve the documentation on the respective functions and parameters, the MS_Description extended property values are returned correctly. Nevertheless, each new snapshot and compilation of HTML files (even Compiled HTML Help files) displays the garbled mess.
The SQL for one such function is as follows:
CREATE FUNCTION SomeFunction (
@aParameter AS INT
) RETURNS VARCHAR(1000) AS BEGIN
RETURN 'something'
END
GO
-------------------------------------------------------------------
-- DOCUMENTATION
EXEC sp_addextendedproperty
'MS_Description', 'Calculates something from nothing.'
, 'SCHEMA', 'dbo'
, 'FUNCTION', 'SomeFunction'
, NULL, NULL
EXEC sp_addextendedproperty
'MS_Description', 'Provides nothing to function.'
, 'SCHEMA', 'dbo'
, 'FUNCTION', 'SomeFunction'
, 'PARAMETER', '@aParameter'
--end DOCUMENTATION
-------------------------------------------------------------------
SELECT dbo.SomeFunction( 3 )
SELECT * FROM ::fn_listextendedproperty('MS_Description', 'SCHEMA', 'dbo', 'FUNCTION', 'SomeFunction', NULL, NULL)
SELECT * FROM ::fn_listextendedproperty('MS_Description', 'SCHEMA', 'dbo', 'FUNCTION', 'SomeFunction', 'PARAMETER', NULL)
When running this SQL, you'll notice that the function is made, documented, run successfully, and the documentation verified to exist and be well-formatted. However, when I create either an HTML output or CHM output of all database objects (including user defined functions), or just User Defined Functions, or just tables and User Defined Functions and a few other things--in any case--the documentation for SomeFunction ends up being "æ…ƒæ¬æ±µç‘¡ç¥çŒ æµ¯ç‘¥æ¥¨æ®æ˜ æ½²âæ½®æ¡´æ¹©â¹§" and the documentation for @aParameter, "ç‰ç™¯æ‘©ç¥æ¸ 瑯楨æ®ç â¯ç•¦æ®æ¥´æ¹¯." My database is a SQL Server 2005 Express Edition, and my operating system is XP Professional Service Pack 2. Also, I noticed that the documentation on all of the database's User Defined Functions and their respective parameters is similarly garbled (and they are all garbled differently, so it seems to be some kind of encoding issue when Bi Documenter processes the MS_Description extended properties of FUNCTIONs in particular)--note that I haven't had issues like this with tables, columns, stored procedures, or stored procedure parameters. And finally, I'm using BI Documenter Database Edition, Product version: 2.0.13.0; File version: 2.0.13.0; Language: Language Neutral. Hope this helps track down what's going on here. I'll be happy to clarify anything you'd like fyi.
-Olen Davis